A simple program to test the functionality of Mbed serial pins.

Dependencies:   mbed

Fork of Serial_test by George Edwards

This code was inspired by the issues I faced with my Mbed. I had inadvertently blown up on of the serial ports, so I wrote this simple echo program. Just connect the serial output to the input and run the program. You should see messages appear on the serial terminal of your screen, diagnosing your issues.

Files at this revision

API Documentation at this revision

Comitter:
melmon
Date:
Wed Jun 24 10:26:25 2015 +0000
Commit message:
Initial Release

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 24 10:26:25 2015 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"              
+/*
+To use, make sure that you have a connection between your serial port tx and rx pins
+*/ 
+Serial pc(USBTX, USBRX);
+Serial loop1(p9, p10);
+Serial loop2(p13, p14);
+ 
+int main() {
+    pc.printf("You Should see a message about the port below: \n\r");
+    loop1.printf("Serial Port 1 Works \n\r");
+    loop2.printf("Serial Port 2 Works \n\r");
+    while(1) {
+        //pc.putc(loop1.getc());
+        pc.putc(loop1.getc());
+        
+        
+        
+        
+        
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jun 24 10:26:25 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7
\ No newline at end of file