Team DIANA / MX106

Dependencies:   AX12

Revision:
1:98b4e06bec81
Parent:
0:9f596b4d0cc6
--- a/main.cpp	Fri Apr 22 17:54:44 2016 +0000
+++ b/main.cpp	Fri Apr 22 18:29:43 2016 +0000
@@ -2,8 +2,19 @@
 #include "AX12.h"
 
 int main() {
+   Serial pc(USBTX, USBRX);
    AX12 MX106(PA_10, PB_6, PB_5, 1, 57600);
-   MX106.SetMode(1);
-   MX106.SetCRSpeed(0.25);
+   pc.printf("Start run!");
+   char txt;
    
+   while (1) {
+  if (pc.readable()) {
+        txt = pc.getc();
+        
+        if (txt =='r') { 
+        pc.printf("In the if");                      
+        MX106.SetMode(1);
+        MX106.SetCRSpeed(0.25);}
+        }
+    }
 }
\ No newline at end of file