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 PwmOut sg90azul(PB_9);//SE NOMBRA OBJETO Y SE ESTABLECE PIN DEL OBJETO 00003 DigitalOut ledgrande(LED1);//SE PROGRAMA EL LED A UTILIZAR 00004 int a=1,x=500; 00005 int main() 00006 { 00007 sg90azul.period_ms(20); 00008 while (a<=18) 00009 { 00010 sg90azul.pulsewidth_us(x); 00011 wait_ms(1000); 00012 x=x+120; 00013 a++; 00014 if(a==18) 00015 { 00016 while(a>1) 00017 { 00018 sg90azul.pulsewidth_us(x); 00019 wait_ms(1000); 00020 x=x-120; 00021 a--; 00022 } 00023 } 00024 } 00025 }
Generated on Tue Aug 2 2022 20:13:01 by
1.7.2