This will echo what you type directly to the LCD and serial.

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
dan_cuspi
Date:
Sat Sep 07 17:25:17 2013 +0000
Commit message:
This will echo what you type directly to the lcd

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
diff -r 000000000000 -r 43501f452595 TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Sat Sep 07 17:25:17 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3
diff -r 000000000000 -r 43501f452595 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Sep 07 17:25:17 2013 +0000
@@ -0,0 +1,31 @@
+#include "TextLCD.h"
+#include "mbed.h"
+TextLCD lcd(p21, p22, p23, p24, p25, p26); // rs, e, d4-d7
+Serial pc(USBTX, USBRX);
+
+int main()
+{
+    char c;
+    int i=0;
+    pc.printf("\x1B[2J");
+    pc.printf("\x1B[H");
+    pc.printf("Echoes back to the screen and LCD anything you type\n\r");
+    while(1) {
+
+        c=(pc.putc(pc.getc()));
+        lcd.printf("%c",c);
+        i++;
+
+
+
+        if (i==32) {
+            wait(0.1);
+            lcd.cls();//clear
+            pc.printf("\x1B[2J");
+            pc.printf("\x1B[H");
+            i=0;
+        }
+    }
+
+
+}
\ No newline at end of file
diff -r 000000000000 -r 43501f452595 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Sep 07 17:25:17 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9c8f0e3462fb
\ No newline at end of file