![](/media/cache/profiles/8631e5b91354a846f00dbbf16ad94259.jpg.50x50_q85.jpg)
Test program for serial interface
This program turns the red LED on and then waits for a character to be entered at the terminal. The LED then goes off for 500ms before the cycle repeats.
The purpose of the program is to demonstrate the use of the serial link
Diff: main.cpp
- Revision:
- 2:e92d97ac59e4
- Parent:
- 1:961580c296da
- Child:
- 3:5b27b27e68ab
diff -r 961580c296da -r e92d97ac59e4 main.cpp --- a/main.cpp Wed Jan 25 15:44:53 2017 +0000 +++ b/main.cpp Sat Jan 13 18:34:58 2018 +0000 @@ -1,5 +1,6 @@ +// Serial demo using mbed 5 + #include "mbed.h" -#include "rtos.h" DigitalOut myled(LED1); Serial pc(USBTX, USBRX); // tx, rx