Simple LCD scrolling text for 16 character LCD display.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Rainycat
Date:
Mon Apr 05 21:43:07 2010 +0000
Commit message:

Changed in this revision

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/main.cpp	Mon Apr 05 21:43:07 2010 +0000
@@ -0,0 +1,28 @@
+
+
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(p24, p25, p26, p27, p28, p29, p30); // rs, rw, e, d0, d1, d2, d3
+
+const char *message = "                Hello there mousie!";
+
+int main() {
+    //lcd.printf("Yay! Woo! from  Rainycat!");
+    while (1) {
+    int i;
+    for (i = 0; message[i]; i++) {
+        lcd.locate(0,0);
+        int j, k = i;
+        for (j = 0; j < 15; j++) {
+            if (message[k+j]) {
+                lcd.putc(message[k+j]);
+            } else {
+                lcd.putc(' ');
+                k--;
+            }
+        }
+        wait_ms(450);
+    }    
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Apr 05 21:43:07 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0