Marco Rubio
/
RTOS_Controller
Controller for Seagoat in the RoboSub competition
Fork of ESC by
Diff: main.cpp
- Revision:
- 2:aabc14a9a8c8
- Child:
- 3:5ffe7e9c0bb3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat May 21 00:06:43 2016 +0000 @@ -0,0 +1,18 @@ + // Continuously sweep the servo through it's full range + #include "mbed.h" + #include "Servo.h" + + Servo myservo(led1); + + int main() { + while(1) { + for(int i=0; i<100; i++) { + myservo = i/100.0; + wait(0.01); + } + for(int i=100; i>0; i--) { + myservo = i/100.0; + wait(0.01); + } + } + } \ No newline at end of file