a
Dependencies: Locate Move Servo button mbed
Fork of 4thcomp by
Diff: main.cpp
- Revision:
- 9:94aa6a12b730
- Parent:
- 8:21f40f92215f
- Child:
- 10:118d86939032
--- a/main.cpp Tue Sep 06 09:31:30 2016 +0000 +++ b/main.cpp Wed Sep 07 04:58:16 2016 +0000 @@ -3,18 +3,31 @@ #include "locate.h" #include "move.h" +DigitalIn start(USER_BUTTON); +DigitalOut buzzer(PB_10); + int main() { setup(); initmotor(); - - wait(1); - pmove(600, 0); + buzzer = 0; + while(start); + buzzer = 1; + wait_us(1); + while(!start); + while(start); + buzzer = 0; - back(300, 0); - + while(1) + { + back300(); + pmove(300,300); + pmove(0,300); + pmove(0,0); + } while(1) { update(); } + }