Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Conversation

tesch1
Copy link

@tesch1 tesch1 commented Jul 23, 2013

I've ported the TMP006 example from c++ to python. It seems to work for me, hopefully it will be useful to someone else too.

I hereby assign any rights I may have had to this code to Adafruit (though I doubt I had any, since most of the code is copied from y'alls' original driver.)

I had some trouble with the Adafruit_I2C.py i2c wrapper when doing 16-bit accesses using the 8-bit approximation that was in the old code -- the TMP006 didn't like that -- so had to "fix" how those were done. I've also tested those "fixes" with the BMP085 driver and it works, but since I don't have any of the other hardware, can't verify that they're working with the new 16-bit access functions.

Cheers, mt

@microbuilder
Copy link
Contributor

I'll have to get my hands on a TMP006 to test the new driver, but the 16-bit I2C access issues should be fixed now.

@kidoman
Copy link

kidoman commented Jan 5, 2014

Why not merge this?

@ladyada
Copy link
Member

ladyada commented Jan 5, 2014

it probably needs to be rewritten because it 'fixes' some i2c access stuff we already fixed

@tesch1
Copy link
Author

tesch1 commented Feb 17, 2014

nah, just get Adafruit_TMP006/Adafruit_TMP006.py and Adafruit_TMP006/Adafruit_TMP006_example.py and ignore the changes to i2c. dont worry about attribution or whatever, i honestly don tcare. i dont have time ot fix it and dont use it anymore, but would be glad if it can help someone else.

@tdicola
Copy link
Contributor

tdicola commented Jul 27, 2014

Thanks for submitting the pull request. I pulled out Adafruit_TMP006.py and its example, but am getting unexpected values--the ID check fails and the measured values are noise/wrong:

WARN TMP006: Manufacturer ID Mismatch (4954)
WARN TMP006: Device ID Mismatch (6700)
Pausing 2.0 s...
Die Temperature:    -143.91 C / -227.03 F
Object Temperature: 503.28 C / 937.91 F
Pausing 2.0 s...
Die Temperature:    -143.91 C / -227.03 F
Object Temperature: 503.28 C / 937.91 F
Pausing 2.0 s...
Die Temperature:    -143.91 C / -227.03 F
Object Temperature: 503.28 C / 937.91 F
Pausing 2.0 s...

I tested the same TMP006 sensor on an Arduino and it gives back the expected values so I don't think it's an issue with the sensor.

I'll close this pull for now since I can't verify it's working. However the TMP006 is on my list of sensors to add support for the Pi & BeagleBone Black so I'll come back soon and investigate more to get a working TMP006 python library.

@tdicola tdicola closed this Jul 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants