ECE 4180 Lab 2 Part 9

Dependencies:   Servo mbed

Fork of Servo_HelloWorld by Simon Ford

main.cpp

Committer:
simon
Date:
2010-11-23
Revision:
1:40d2fd0b99e6
Parent:
0:ea7182628dfa
Child:
2:4609f408d050

File content as of revision 1:40d2fd0b99e6:

// Hello World to sweep a servo through its full range

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

Servo myservo(p21);

int main() {    
    for(float p=0; p<1.0; p += 0.1) {
        myservo = p;
        wait(0.2);
    }
}