s

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
yanay_amir
Date:
Wed May 04 15:09:45 2016 +0000
Commit message:
s

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	Wed May 04 15:09:45 2016 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+Serial RN42(p9, p10);
+Serial pc(USBTX,USBRX);
+DigitalOut RN42_led(LED1);
+DigitalOut pc_led(LED2);
+DigitalIn joycenter(p14);
+InterruptIn obj(p14);
+void joy()
+{
+     wait_ms(25);
+     if(joycenter)
+     {    
+         pc.printf("$$$\r\n"); 
+         if(RN42.readable())
+         {
+             while(RN42.getc() != '\n'){} 
+         }
+         pc.printf("r,1\r\n"); 
+    }
+     
+}
+int main() {
+
+    RN42.baud(115200);
+    pc.baud(115200);
+    pc.printf("Ready\n");
+    obj.rise(&joy);
+    joycenter.mode (PullDown);
+    while(1)
+    {
+    
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed May 04 15:09:45 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/aae6fcc7d9bb
\ No newline at end of file