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/

TMP006 and Raspberry Pi

by crazedanimekid on Mon Mar 18, 2013 1:13 pm

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
crazedanimekid
 
Posts: 3
Joined: Mon Dec 17, 2012 8:23 pm
Location: MI-US

Re: TMP006 and Raspberry Pi

by adafruit_support_mike on Tue Mar 19, 2013 6:33 pm

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.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 9482
Joined: Thu Feb 11, 2010 1:51 pm

Re: TMP006 and Raspberry Pi

by crazedanimekid on Thu Mar 21, 2013 5:42 pm

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
crazedanimekid
 
Posts: 3
Joined: Mon Dec 17, 2012 8:23 pm
Location: MI-US

Re: TMP006 and Raspberry Pi

by adafruit_support_mike on Fri Mar 22, 2013 11:05 am

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.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 9482
Joined: Thu Feb 11, 2010 1:51 pm