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.

Revision:
0:e148303bda4f
--- /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());
+        
+        
+        
+        
+        
+    }
+}