TMP006 and Raspberry Pi

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
crazedanimekid
 
Posts: 3
Joined: Mon Dec 17, 2012 9:23 pm

TMP006 and Raspberry Pi

Post by crazedanimekid »

I'm attempting to connect the TMP006 infrared temperature sensor to my Pi, and I'm a bit lost...

I have wired up the sensor, and saw 0x40 as the sensor when running i2cdetect. However, I'm not having luck adding the device to the modules list with modprobe.

I also noticed that the libraries available are for Arduino, and I'm not sure how to port that for the Pi.

Can anybody steer me in the right direction?

Thanks in advance.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: TMP006 and Raspberry Pi

Post by adafruit_support_mike »

I did some digging around and couldn't find a Linux module for the TMP006.

Writing a Linux kernel module is outside my area of expertise, but I can't imagine it would be a trivial port of the Arduino code. My guess is that you'd be better off moving the code up a layer of abstraction or two and make a library you can call from within your own code.

The Arduino code can give you a general roadmap there. It has all the constants and call-response sequences necessary to make the TMP006 talk.

crazedanimekid
 
Posts: 3
Joined: Mon Dec 17, 2012 9:23 pm

Re: TMP006 and Raspberry Pi

Post by crazedanimekid »

I'm afraid writing a Linux kernel driver for this hardware is far above my capabilities with Linux. I believe I will have to set this project aside for now... :?

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: TMP006 and Raspberry Pi

Post by adafruit_support_mike »

You don't have to give up entirely.

Kernel drivers are convenient, but they aren't necessary. If you have one, it does all the annoying gruntwork of translating "I want a temperature reading" into a series of I2C commands. If you don't have one, you can send those same commands yourself.

The Adafruit I2C python module: https://github.com/adafruit/Adafruit-Ra ... uit_I2C.py gives you some basic functions that control the I2C bus directly. You can combine those with the "here's how to talk to the TMP006" code from the Arduino library and make your own module that will get the sensor working for you.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”