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: MODSERIAL mbed-rtos mbed
Fork of Master by
Diff: main.cpp
- Revision:
- 4:aaaadb45cbd9
- Parent:
- 3:12e1f116ea42
- Child:
- 5:37733f175430
--- a/main.cpp Fri Sep 12 05:11:39 2014 +0000 +++ b/main.cpp Fri Sep 12 08:08:21 2014 +0000 @@ -8,7 +8,7 @@ //BT_MASTER or BT_SLAVE #define DEVICE_ROLE BT_MASTER -Serial pc(USBTX, USBRX); // tx, rx +//Serial pc(USBTX, USBRX); // tx, rx //debug DigitalOut led1(LED1); @@ -48,6 +48,7 @@ float ir_s,fsr_s; //sensor of slave sync(SYNC_SENSOR,NULL,NULL); receiveSensor( &ir_s, &fsr_s ); - led1 = ( ir_s>0.5 ? 1 : 0 ); - wait(0.5); + led4 = ( ir_s>0.5 ? 1 : 0 ); + led2 = ( led2 ? 0 : 1 ); + wait(1); } \ No newline at end of file