ADT7410 Temperature Sensor sample.

Dependencies:   mbed

About ADT7410

ADT7410 is a temperature sensor and can be controlled by using the I2C.

About sample program

This program outputs temperature data.
In order to run I2C communication with connecting GR-PEACH and the sensor, you will need to pull up.
Short jumper of GR-PEACH, leakage solder in two places of "PU" of the sensor base, or, add with the external resistor (10KΩ).

About wiring

SensorGR-PEACH
VDD3.3V
GNDGND
SCLD15
SDAD14
Revision:
0:6e109b79e249
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu May 12 10:16:22 2016 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "ADT7410.h"
+
+ADT7410 sensor(I2C_SDA, I2C_SCL);
+DigitalOut led1(LED1);
+
+int main() {
+    float temp;
+
+    printf("Sensor start!\n");
+    led1 = 1;
+    while(1) {
+        temp = sensor.temp_value();
+        printf("Temperature = %2.2f\n",temp);  
+        led1 = !led1;
+        wait_ms(250);
+    }
+}