Robosub controller

Dependencies:   IMU MODSERIAL Servo mbed

Fork of RTOS_Controller by Marco Rubio

main.cpp

Committer:
gelmes
Date:
2016-05-21
Revision:
2:aabc14a9a8c8
Child:
3:5ffe7e9c0bb3

File content as of revision 2:aabc14a9a8c8:

 // 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);
         }
     }
 }