This program work with LCD e Timeout

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
luizlago
Date:
Sat Jul 02 21:49:05 2011 +0000
Commit message:
1.0

Changed in this revision

TextLCD.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/TextLCD.lib	Sat Jul 02 21:49:05 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jul 02 21:49:05 2011 +0000
@@ -0,0 +1,33 @@
+// Hello World! for the TextLCD
+
+#include "mbed.h"
+#include "TextLCD.h"
+
+Timeout timeTick;
+TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7
+
+void onTimeout() {
+    static int estado = 0;
+    
+    if (estado == 0)
+    {
+        lcd.cls();
+        lcd.printf("Hello World!!!");
+        estado = 1;
+        timeTick.attach(&onTimeout, 1);
+    }
+    else 
+    {
+        lcd.cls();
+        estado = 0;
+        timeTick.attach(&onTimeout, 0.5);
+    }
+}
+
+int main() {
+    
+    timeTick.attach(&onTimeout, 2);
+    
+    while(1) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jul 02 21:49:05 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912