Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos 4DGL-uLCD-SE RPCInterface
Revision 18:d58ce903471a, committed 2019-12-08
- 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();