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

Files at this revision

API Documentation at this revision

Comitter:
WilliamMarshQMUL
Date:
Wed Jan 22 12:34:48 2020 +0000
Parent:
3:5b27b27e68ab
Commit message:
Echo twice to show clearly what's happening

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 5b27b27e68ab -r a2d1329d042c main.cpp
--- a/main.cpp	Wed Jan 09 22:22:22 2019 +0000
+++ b/main.cpp	Wed Jan 22 12:34:48 2020 +0000
@@ -13,6 +13,7 @@
         c = pc.getc();
         myled = 1;  // turn off
         pc.putc(c);
+        pc.putc(c); // echo twice
         pc.putc('\r');
         pc.putc('\n');
         wait(0.5);