version 3 通信方式,マイコン等に変更あり

Dependencies:   AQM0802A PID Servo mbed

Revision:
1:f91d53098d57
Parent:
0:65b9e62cc2b6
Child:
2:e84bb87eea71
--- a/main.cpp	Fri Mar 06 01:16:05 2015 +0000
+++ b/main.cpp	Fri Mar 06 02:15:10 2015 +0000
@@ -293,8 +293,7 @@
     pid.setMode(AUTO_MODE);                         //pid sed def
     pid.setSetPoint(REFERENCE);                     //pid sed def  
     
-    Mbed.read_data(rx_data, ADDRESS);
-    Mbed.start_read();
+
  
     
 }
@@ -397,10 +396,14 @@
     AnotherAction[1] = IrBackAction;
     AnotherAction[2] = GoHome;
     */
+    
     SetUp();/*set up routine*/
+    Mbed.read_data(rx_data, ADDRESS);
+    Mbed.start_read();
+    //Mbed.check_rx_wait();
     StartLoop(); /*loop strat, switch push end*/
     
-    while(1){
+    while(0){
          Power = 0;
          Led[0] = 1;
          Rad = 0;
@@ -447,17 +450,17 @@
         
     }
     
-    /*
-    while(0){
+    
+    while(1){
     //デモプログラム
-    S555.position(0.0);
+    Receive();
+    wait(0.1);
+    pc.printf("%d %d %d %d %d\n",IrData[0],IrData[1],IrData[2],PingData[0],PingData[1]);
+    //pc.printf("%d %d %d %d %d\n",rx_data[0],rx_data[1],rx_data[2],rx_data[0],rx_data[1]);
     
-    wait(1.5);
-    S555.position(90.0);
-
     }
     
-    */
+    
     
     
 }