4D display with Gecko board

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
shakeeb
Date:
Tue Mar 29 11:53:24 2016 +0000
Commit message:
trying to show keyboard strokes on 4D display

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	Tue Mar 29 11:53:24 2016 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+ 
+Serial pc(USBTX, USBRX);
+Serial screen(PB9,PB10);
+
+DigitalOut pc_activity(LED1);
+DigitalOut screen_activity(LED2);
+ 
+int main(void) {
+    screen.baud(9600);
+    pc.printf("Hello World!\n\r");
+   
+    while(1)
+    {
+        if(screen.readable()) {
+            pc.putc(screen.getc());
+            screen_activity = !screen_activity;
+        }
+        
+        if(pc.readable()) {            
+/*
+            screen.putc(0x01);
+            screen.putc(0x06);
+            screen.putc(0x01);
+            screen.putc(0x00);
+            screen.putc(0x01);
+            screen.putc(0x1A);
+*/
+            screen.putc(pc.getc());
+            pc_activity = !pc_activity;
+        }
+        
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 29 11:53:24 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/c0f6e94411f5
\ No newline at end of file