Haines Todd / Mbed 2 deprecated ECE4180_Final_Project

Dependencies:   mbed mbed-rtos 4DGL-uLCD-SE RPCInterface

Files at this revision

API Documentation at this revision

Comitter:
robo1340
Date:
Sun Dec 08 18:17:07 2019 +0000
Parent:
17:8d33d5305d26
Commit message:
enabled bluetooth serial

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Dec 07 16:43:42 2019 +0000
+++ b/main.cpp	Sun Dec 08 18:17:07 2019 +0000
@@ -21,7 +21,7 @@
 volatile int utc_offset; //keeps track of the current timezone of the watch
 
 uLCD_4DGL uLCD(p9,p10,p11); // serial tx, serial rx, reset pin;
-//Serial bluetooth(p13,p14);
+Serial bluetooth(p28,p27);
 Serial pc(USBTX, USBRX);
 
 InterruptIn view_button(p12);
@@ -165,13 +165,13 @@
     
     while(true) {
         
-        if (pc.readable() == true) { //comment out when using bluetooth to receive rpc commands
-        //if (bluetooth.readable() == true) {
+        //if (pc.readable() == true) { //comment out when using bluetooth to receive rpc commands
+        if (bluetooth.readable() == true) {
             
             stdio_mutex.lock();
             
-            buf[buf_pos] = pc.getc(); //comment out when using bluetooth to receive rpc commands
-            //buf[buf_pos] = bluetooth.getc();
+            //buf[buf_pos] = pc.getc(); //comment out when using bluetooth to receive rpc commands
+            buf[buf_pos] = bluetooth.getc();
             
             stdio_mutex.unlock();