Dependencies:   mbed LCD

Files at this revision

API Documentation at this revision

Comitter:
yamaguch
Date:
Thu Dec 22 06:12:26 2011 +0000
Commit message:

Changed in this revision

LCD.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD.lib	Thu Dec 22 06:12:26 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/yamaguch/code/LCD/#b3def1d4f466
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Dec 22 06:12:26 2011 +0000
@@ -0,0 +1,56 @@
+#include "mbed.h"
+#include "LCD.h"
+/*
+ +----------------------------------------+
+ |                                        |
+ |                                        |
+ +----------------------------------------+
+  RST SCL SDA GND VDD (6) (7) (8) Anode (K)
+*/
+LCD lcd(p28, p27); // sda scl reset = NC, no-backlight
+//LCD lcd(p28, p27, p29); // sda scl reset backlight
+//LCD lcd(p9, p10, p8, p11, 32); // sda scl reset backlight contrast
+//LCD lcd(p9, p10, p8);
+
+int main() {
+    lcd.printf("Display Test\n");
+    wait(0.2);
+    lcd.showIcon(LCD::ANTENNA);
+    wait(0.2);
+    lcd.showIcon(LCD::PHONE);
+    wait(0.2);
+    lcd.showIcon(LCD::ALARM);
+    wait(0.2);
+    lcd.showIcon(LCD::INPUT);
+    wait(0.2);
+    lcd.showIcon(LCD::UP);
+    wait(0.2);
+    lcd.showIcon(LCD::DOWN);
+    wait(0.2);
+    lcd.showIcon(LCD::UPDOWN);
+    wait(0.2);
+    lcd.showIcon(LCD::LOCK);
+    wait(0.2);
+    lcd.showIcon(LCD::NO_SOUND);
+    wait(0.2);
+    lcd.showIcon(LCD::BATTERY0);
+    wait(0.2);
+    lcd.showIcon(LCD::BATTERY1);
+    wait(0.2);
+    lcd.showIcon(LCD::BATTERY2);
+    wait(0.2);
+    lcd.showIcon(LCD::BATTERY3);
+    wait(0.2);
+    lcd.showIcon(LCD::MARK);
+    wait(0.2);
+    lcd.hideIcon(LCD::ALL);
+    lcd.setBacklight(true);
+    for (int i = 0; i < 100; i++) {
+        lcd.printf("value = %d\n", i);
+        wait(0.1);
+    }
+    lcd.setBacklight(false);
+    lcd.printf("Hello World, Good-bye world!");
+    wait(1.0);
+    lcd.showIcon(LCD::ALL);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Dec 22 06:12:26 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912