![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ECE 4180 Lab 2 Servo
Fork of Servo_HelloWorld by
main.cpp
- Committer:
- dhcabinian
- Date:
- 2016-02-15
- Revision:
- 2:a972a1a76954
- Parent:
- 1:40d2fd0b99e6
File content as of revision 2:a972a1a76954:
// 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); } wait(10); for(float p=1.0; p>=0; p -= 0.2) { myservo = p; wait(0.2); } }