Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: lab2_a.cpp
- Revision:
- 0:94a2d885c9bb
- Child:
- 1:6e1ddcab9b76
diff -r 000000000000 -r 94a2d885c9bb lab2_a.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lab2_a.cpp Fri Aug 21 18:21:10 2020 +0000
@@ -0,0 +1,22 @@
+/*
+ Title: Program to generate output to the PC screen
+ Author: Your Name, Student ID, Course CODE, Lab Section
+ Date: Today's Date
+ Description: This program will take characters from the keyboard and
+ continually send them to the screen. You can use ANSI
+ ESCAPE sequences to position the cursor, clear the
+ screen, and change screen foreground and background
+ colours.
+*/
+#include "mbed.h"
+
+int main(void)
+{
+ unsigned char input; // variable to get char from keyboard
+
+ for(;;) {
+ input=getc(stdin); // get char and put into variable input
+ // if(input == 0x0d) // if input is <RETURN>
+ // putc(0x0a,stdout); // output a <LINE FEED>
+ }
+}
\ No newline at end of file