![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Demo using the user button and serial port on the Nucleo board, for Stage 1 Engineering at the University of York
Diff: main.cpp
- Revision:
- 0:fac2ffd6f143
- Child:
- 1:ee571cefc13b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Aug 25 11:00:34 2020 +0000 @@ -0,0 +1,20 @@ + +#include "mbed.h" + +int main() +{ + // Initialise the digital pin LED1 as an output + DigitalOut led(LED1); + + // Loop forever... + while (true) { + // Switch the LED on + led = true; + // Wait for 200ms + thread_sleep_for(200); + // Switch the LED off + led = false; + // Wait for 300ms + thread_sleep_for(300); + } +}