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 /* Ejercicio 1: hola mundo en MBED 00002 Con este ejercicio básico se pretende comprobar el correcto funcionamiento del microcontrolador. 00003 Únicamente se define una variable de salida ligada a uno de los LEDS integrados y se lo 00004 hace parpadear a un ratio determinado. 00005 */ 00006 00007 #include "mbed.h" 00008 #include "platform/mbed_thread.h" 00009 00010 //Variable global marcando el ratio. 00011 #define BLINKING_RATE_MS 500 00012 00013 00014 int main() 00015 { 00016 //Variable del LED como salida 00017 DigitalOut led(LED1); 00018 00019 while (true) { 00020 //Cambiamos el LED de estado y esperamos el peridodo de tiempo marcado anteriormente. 00021 led = !led; 00022 thread_sleep_for(BLINKING_RATE_MS); 00023 } 00024 }
Generated on Sun Aug 7 2022 17:21:42 by
1.7.2