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.
Dependencies: mbed Servomotor
main.cpp
00001 #include "RealPwmOut.hpp" 00002 #include "Servomotor.hpp" 00003 00004 int main() 00005 { 00006 RealPwmOut pwm_out(p21);; 00007 Servomotor target(pwm_out); 00008 00009 printf("Test: The servo should go from 0 to 90 degrees, and back to 0\r\n"); 00010 00011 while(true) 00012 { 00013 target.set_position_down(); 00014 wait_ms(500); 00015 target.set_position_up(); 00016 wait_ms(500); 00017 } 00018 00019 }
Generated on Wed Jul 27 2022 07:55:35 by
1.7.2