-
Connect Vdd to the power supply, 3V or 5V is fine. Use the same
voltage that the microcontroller logic is based off of. For most
Arduinos, that is 5V
- Connect GND to common power/data ground
- Connect the SCL pin to the I2C clock SCL pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A5, on a Mega it is also known as digital 21 and on a Leonardo/Micro, digital 3
- Connect the SDA pin to the I2C data SDA pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A4, on a Mega it is also known as digital 20 and on a Leonardo/Micro, digital 2
Download Adafruit_TMP007
To begin reading sensor data, you will need to download the Adafruit TMP007 library from the Arduino library manager.
Open up the Arduino library manager:
Search for the Adafruit TMP007 library and install it
We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use
Load Demo
Open up File->Examples->Adafruit_TMP007->tmp007 and upload to your Arduino wired up to the sensorThe TMP007 library is pretty straight forward! Start by creating the Adafruit_TMP007 object with:
Adafruit_TMP007 tmp007;
Adafruit_TMP007 tmp007(0x41); // start with a diferent i2c address!
tmp007.begin()
tmp007.begin(TMP007_CFG_1SAMPLE)
if (! tmp007.begin()) { Serial.println("No sensor found"); while (1); }
tmp007.readObjTempC(); tmp007.readDieTempC();
Then wait 4 seconds between readings to get a new reading!
delay(4000); // 4 seconds per reading for 16 samples per reading
Text editor powered by tinymce.