Demo using the user button and serial port on the Nucleo board, for Stage 1 Engineering at the University of York

Dependencies:   UoY-serial

main.cpp

Committer:
ajp109
Date:
2020-08-25
Revision:
0:fac2ffd6f143
Child:
1:ee571cefc13b

File content as of revision 0:fac2ffd6f143:


#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);
    }
}