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 "Led_Colores.h" 00003 00004 DigitalIn sw3(SW3); //Declaramos switch 2 00005 DigitalIn sw2(SW2); //Declaramos switch3 00006 00007 int main() 00008 { 00009 ColorLed(BLACK); 00010 int bandera=0; 00011 while (true) { 00012 if(!sw2 && sw3){ //sw2 se niega porque al apretarlo regresa un 0 00013 ColorLed(RED); //Prende LED rojo 00014 } 00015 else if(!sw3 && sw2){ //sw3 se niega porque al apretarlo regresa un 0 00016 ColorLed(BLACK); //Prende LED Azul 00017 wait(1.0f); 00018 ColorLed(GREEN); 00019 } 00020 00021 00022 wait(0.2f); 00023 } 00024 }
Generated on Tue Aug 2 2022 09:16:45 by
1.7.2