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 00003 Serial pc(USBTX, USBRX); // tx, rx 00004 00005 DigitalOut led_rojo(LED_RED); 00006 DigitalOut led_verde(LED_GREEN); 00007 DigitalOut led_azul(LED_BLUE); 00008 00009 int main() 00010 { 00011 pc.printf("Presione 'H' para encender LED1 o 'L' para apagarlo\n"); 00012 00013 while(1) 00014 { 00015 char c = pc.getc(); 00016 if(c == 'H') 00017 { 00018 led_rojo=0; 00019 led_verde=0; 00020 led_azul=0; 00021 } 00022 if(c == 'L') 00023 { 00024 led_rojo=1; 00025 led_verde=1; 00026 led_azul=1; 00027 } 00028 } 00029 }
Generated on Sat Aug 20 2022 08:59:30 by
1.7.2