Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Servo_HelloWorld by
main.cpp
00001 // Hello World to sweep a servo through its full range 00002 00003 #include "mbed.h" 00004 #include "Servo.h" 00005 00006 Servo myservo(p21); 00007 00008 int main() { 00009 for(float p=0; p<1.0; p += 0.1) { 00010 myservo = p; 00011 wait(0.2); 00012 } 00013 00014 wait(10); 00015 00016 for(float p=1.0; p>=0; p -= 0.2) { 00017 myservo = p; 00018 wait(0.2); 00019 } 00020 }
Generated on Tue Jul 19 2022 02:40:00 by
