The subsystem design/basis for the final project

Dependencies:   mbed-rtos mbed-src pixylib

Revision:
16:73db7ef2deb6
Parent:
15:caa5a93a31d7
Child:
17:47e107f9587b
diff -r caa5a93a31d7 -r 73db7ef2deb6 global.cpp
--- a/global.cpp	Sat Mar 26 19:24:02 2016 +0000
+++ b/global.cpp	Mon Mar 28 21:39:06 2016 +0000
@@ -13,8 +13,8 @@
 // Comunication 
 SPI deSpi(p5, p6, p7);
 Pixy pixy(Pixy::SPI, p11, p12, p13);
-//Serial pc(USBTX, USBRX); // PC serial channel
-Serial pc(p28, p27); // Bluetooth serial channel
+Serial pc(USBTX, USBRX); // PC serial channel
+Serial bt(p28, p27); // Bluetooth serial channel
 
 // Control
 PeriodicPI leftMotorPI(MOTOR_PERIOD, MOTOR_KP, MOTOR_KI);
@@ -35,6 +35,6 @@
 // Returns the last character
 char flushBuffer(void) { 
     char ch;
-    while (pc.readable()) ch = pc.getc();
+    while (bt.readable()) pc.putc(bt.getc());
     return ch; 
 }
\ No newline at end of file