Serial mbed

Dependencies:   C12832 mbed

Fork of Serial_HelloWorld_Mbed by mbed official

Revision:
2:7d1b18bdfdeb
Parent:
1:560b8ced44df
--- a/main.cpp	Sun Sep 21 05:44:05 2014 +0000
+++ b/main.cpp	Mon Feb 23 13:31:40 2015 +0000
@@ -1,10 +1,20 @@
 #include "mbed.h"
- 
-Serial pc(USBTX, USBRX); // tx, rx
+#include "C12832.h"
+
+C12832 lcd(p5, p7, p6, p8, p11);
+Serial pc(USBTX, USBRX);
  
-int main() {
-    pc.printf("Hello World!\n\r");
-    while(1) {
-        pc.putc(pc.getc() + 1); // echo input back to terminal
-    }
+int main() 
+{
+    char buffer[128]; //
+        while(1)
+        {       
+            pc.gets(buffer, 2); // Take the value in buffer and put in Serial
+         
+            pc.printf("I got '%s'\n", buffer); // Displays stuff
+            lcd.locate(0,0);
+            lcd.cls();
+            lcd.printf(buffer);
+        }
+        
 }
\ No newline at end of file