Prueba compartir codigo

Committer:
Daniel_2001
Date:
Fri May 01 22:13:37 2020 +0000
Revision:
0:122694f57b24
Prueba;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Daniel_2001 0:122694f57b24 1 /* mbed Microcontroller Library
Daniel_2001 0:122694f57b24 2 * Copyright (c) 2019 ARM Limited
Daniel_2001 0:122694f57b24 3 * SPDX-License-Identifier: Apache-2.0
Daniel_2001 0:122694f57b24 4 */
Daniel_2001 0:122694f57b24 5
Daniel_2001 0:122694f57b24 6 #include "mbed.h"
Daniel_2001 0:122694f57b24 7 #include "platform/mbed_thread.h"
Daniel_2001 0:122694f57b24 8
Daniel_2001 0:122694f57b24 9
Daniel_2001 0:122694f57b24 10 // Blinking rate in milliseconds
Daniel_2001 0:122694f57b24 11 #define BLINKING_RATE_MS 500
Daniel_2001 0:122694f57b24 12
Daniel_2001 0:122694f57b24 13
Daniel_2001 0:122694f57b24 14 int main()
Daniel_2001 0:122694f57b24 15 {
Daniel_2001 0:122694f57b24 16 // Initialise the digital pin LED1 as an output
Daniel_2001 0:122694f57b24 17 DigitalOut led(LED1);
Daniel_2001 0:122694f57b24 18
Daniel_2001 0:122694f57b24 19 while (true) {
Daniel_2001 0:122694f57b24 20 led = !led;
Daniel_2001 0:122694f57b24 21 thread_sleep_for(BLINKING_RATE_MS);
Daniel_2001 0:122694f57b24 22 }
Daniel_2001 0:122694f57b24 23 }