FM-test
Dependencies: MODSERIAL mbed-rtos mbed
Fork of Master by
Revision 5:37733f175430, committed 2014-09-12
- Comitter:
- 9uS7
- Date:
- Fri Sep 12 11:43:36 2014 +0000
- Parent:
- 4:aaaadb45cbd9
- Child:
- 6:df6d8ba1907a
- Commit message:
- 09/12/14
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MODSERIAL.lib Fri Sep 12 11:43:36 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/AjK/code/MODSERIAL/#ae0408ebdd68
--- a/bluetooth.cpp Fri Sep 12 08:08:21 2014 +0000 +++ b/bluetooth.cpp Fri Sep 12 11:43:36 2014 +0000 @@ -1,13 +1,14 @@ #include "mbed.h" #include "bluetooth.h" #include "control.h" +#include "MODSERIAL.h" //master -Serial bt(p13, p14); // tx, rx +//RawSerial bt(p13, p14); // tx, rx //slave -//Serial bt(p28, p27); +MODSERIAL bt(p28, p27); -Serial pc(USBTX, USBRX); // tx, rx +MODSERIAL pc(USBTX, USBRX); // tx, rx DigitalOut l1(LED1); DigitalOut l2(LED2); @@ -138,11 +139,12 @@ for( int i=0 ; ; i++ ){ if( bt.readable() ){ pc.printf("readable\n"); + wait(0.05); break; } else if( i>5 ){ l4 = 0; - pc.printf("enable\n"); + pc.printf("not readable\n"); return; } }
--- a/main.cpp Fri Sep 12 08:08:21 2014 +0000 +++ b/main.cpp Fri Sep 12 11:43:36 2014 +0000 @@ -6,7 +6,7 @@ #include "control.h" //BT_MASTER or BT_SLAVE -#define DEVICE_ROLE BT_MASTER +#define DEVICE_ROLE BT_SLAVE //Serial pc(USBTX, USBRX); // tx, rx @@ -14,9 +14,7 @@ DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led4(LED4); - -DigitalOut myled1(LED1); -DigitalOut myled2(LED2); + void masterLoop(void);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Fri Sep 12 11:43:36 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#631c0f1008c3