![](/media/cache/profiles/b5c4ec91390a6fbccf8d918d443563ed.jpg.50x50_q85.jpg)
acd52832_servo example
main.cpp
- Committer:
- jurica238814
- Date:
- 2016-09-20
- Revision:
- 0:a855473fe62b
File content as of revision 0:a855473fe62b:
// Continuously sweep the servo through it's full range #include "mbed.h" #include "Servo.h" Servo myservo(p26); int main() { while(1) { for(int i=0; i<100; i+=2) { myservo = i/100.0; wait(0.05); } for(int i=100; i>0; i-=2) { myservo = i/100.0; wait(0.05); } } }