Alejandro Velasco / Mbed 2 deprecated Servo_Move

Dependencies:   Servo mbed

main.cpp

Committer:
alevelara
Date:
2014-12-30
Revision:
0:72680658bf08

File content as of revision 0:72680658bf08:

#include "mbed.h"
#include "Servo.h"

Servo       myServo(PB_9);
DigitalIn   button(USER_BUTTON);
    

int main(){
    myServo.calibrate(0.0005,45.0);
    
    while(1){
    //While we press the user button, the servo turn right
        if(!button){
           myServo.write(0.5);
        }
    }
}