Example for using the Batron 16x2 LCD driver

Dependencies:   mbed TMP102 PCF2119_16X2_LCD

Files at this revision

API Documentation at this revision

Comitter:
ssozonoff
Date:
Fri May 13 13:27:42 2011 +0000
Commit message:

Changed in this revision

PCF2119_16X2_LCD.lib Show annotated file Show diff for this revision Revisions of this file
TMP102.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 01adc31d3af0 PCF2119_16X2_LCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PCF2119_16X2_LCD.lib	Fri May 13 13:27:42 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ssozonoff/code/PCF2119_16X2_LCD/#1590b28a5be7
diff -r 000000000000 -r 01adc31d3af0 TMP102.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TMP102.lib	Fri May 13 13:27:42 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/donatien/code/TMP102/#b469676e9a9e
diff -r 000000000000 -r 01adc31d3af0 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 13 13:27:42 2011 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "PC2119_16X2_LCD.h"
+#include "TMP102.h"
+
+TMP102 temperature(p28, p27, 0x90);
+
+DigitalOut myled(LED1);
+PC2119_16X2_LCD lcd(p28, p27, p21);
+
+int main() {
+    char str[5];
+    
+    lcd.Init();
+    lcd.clear_display();
+    
+    // spin it 180
+    lcd.flip_display();
+
+    while (1) {
+        lcd.printf("%2.2fC", temperature.read());
+        
+        lcd.write_xy(0x21, 1, 15, true);
+        myled = 1;
+        wait(0.5);
+        myled = 0;
+        lcd.write_xy(0x11, 1, 15, true);        
+        wait(0.5);
+    }
+}
diff -r 000000000000 -r 01adc31d3af0 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri May 13 13:27:42 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912