a

Dependencies:   Locate Move Servo button mbed

Fork of ARAI45th by Tk A

Revision:
12:456d651ef4f0
Parent:
10:118d86939032
--- a/main.cpp	Wed Sep 07 07:37:58 2016 +0000
+++ b/main.cpp	Wed Sep 07 09:42:54 2016 +0000
@@ -2,33 +2,19 @@
 #include "math.h"
 #include "locate.h"
 #include "move.h"
+#include "servo.h"
+#include "button.h"
 
-DigitalIn start(USER_BUTTON);
-DigitalOut buzzer(PB_10);
+
 
 int main()
 {
     setup();
     initmotor();
     
-    buzzer = 0;
-    while(start);
-    buzzer = 1;
-    wait_us(1);
-    while(!start);
-    wait_us(1);
-    while(start);
-    buzzer = 0;
-    
-    while(1)
-    {   
-        back300();
-        pmove(300,300);
-        pmove(0,300);
-        pmove(0,0);
+    while(1){
+        armdegree(12*phaseSW());
+        handdegree(12*phaseSW());
+        beltdegree(12*phaseSW());
     }
-    while(1) {
-        update();
-    }
-    
 }