-
Notifications
You must be signed in to change notification settings - Fork 677
Port of the TMP006 example code to python, some fixes for 16bit SPI access from python #51
Conversation
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. |
Why not merge this? |
it probably needs to be rewritten because it 'fixes' some i2c access stuff we already fixed |
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. |
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:
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. |
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