Report comment

Hi Pete,

It looks like there is a communication issue. As you say you can see the sensor in i2c presumably using the command; i2cdetect -y 1
I get the result
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- --

so the address at the top of the script in the line
TSLaddr = 0x39 #Default I2C address, alternate 0x29, 0x49

is 0x39 for me. If you are not getting 39 then use the alternate number.
I just done a test and if I use 0x49 for me which is wrong I get the error
Traceback (most recent call last):
File "tsTest.py", line 63, in
writebyte(TSLaddr, 0x00 | TSLcmd, TSLon)
OSError: [Errno 121] Remote I/O error

presuming that you have the correct address, there may be an issue with the connection between the sensor and the pi for SDL and SDA pins

Let me know if this dosn't help and see what else I can try on my sensor.