Echo serial example

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
marcozecchini
Date:
Sat Feb 23 11:48:11 2019 +0000
Commit message:
Final commit;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 133aa2caa778 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Feb 23 11:48:11 2019 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+//------------------------------------
+// Terminal configuration
+// 9600 bauds, 8-bit data, no parity
+//------------------------------------
+
+Serial pc(SERIAL_TX, SERIAL_RX);
+
+int main()
+{
+    //pc.baudrate(115200);
+    while(1) {
+        if (pc.readable()){
+            pc.putc(pc.getc());    
+        }
+    }
+}
diff -r 000000000000 -r 133aa2caa778 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Feb 23 11:48:11 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc
\ No newline at end of file