Example program with the C12832 display and TMP102 temperature I2C sensor of the mbed application shield.

Dependencies:   C12832 TMP102 mbed

Revision:
0:9890dd818414
Child:
2:8fef92ca0002
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 01 15:44:12 2014 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "C12832.h"
+#include "TMP102.h"
+
+TMP102 temperature(D14, D15, 0x90);
+C12832 lcd(D11, D13, D12, D7, D10);
+
+int main()
+{
+    // clear the screen
+    lcd.cls();
+    
+    // print the first line and wait 3 sec
+    lcd.locate(0,3);
+    lcd.printf("mbed application board!");
+    wait(3);
+
+    // print the counter prefix; the number will be printed in the while loop
+    lcd.locate(0,15);
+    lcd.printf("temp:", temperature.read());
+    
+    int i=1;
+    while(i++) {
+        lcd.locate(24,15);
+        lcd.printf("%f  ", temperature.read());
+        wait(0.2);
+    }
+}
\ No newline at end of file