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.
main.cpp
00001 #include "mbed.h" 00002 #include "PwmOut.h" 00003 00004 PwmOut servo (A1); // pin para pwm del servo 00005 00006 int main() { 00007 servo.period_ms(20); // es constante no se cambia 00008 00009 while(1); 00010 { 00011 servo.pulsewidth_us(640); // se supone es 0 grados 00012 wait(1); 00013 servo.pulsewidth_us(1220); // variar valor para cambiar los grados toca prueba y error 00014 wait(1); 00015 00016 } 00017 }
Generated on Sun Jul 31 2022 12:23:07 by
1.7.2