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
Diff: main.cpp
- Revision:
- 4:51abc140d5d2
- Parent:
- 3:ec621d656d40
- Child:
- 5:ee564e17915b
--- a/main.cpp Thu Apr 30 23:53:19 2015 +0000
+++ b/main.cpp Fri May 01 16:13:20 2015 +0000
@@ -19,7 +19,7 @@
Serial pc(SERIAL_TX, SERIAL_RX);
DigitalOut bt_pair(PA_7);
-DigitalOut bt_reset(PC_);
+DigitalOut bt_reset(PC_7);
Timer timeout;
char responseBuff[4];
@@ -30,7 +30,7 @@
pc.printf("SENDING {%s}\r",command);
timeout.reset();
timeout.start();
- while(timeout.read_ms()<1000){
+ while(timeout.read_ms()<2000){
if(memcmp(&responseOk[0],&responseBuff[0],4) == 0){
pc.printf("%d ms\r",timeout.read_ms());
timeout.stop();
@@ -63,8 +63,6 @@
wait(0.5);
bt_pair =0;
wait(0.5);
- bluetooth.baud(9600);
- wait(.1);
}
void readResponse(){
for(int z=2;z>0;z--){
@@ -88,6 +86,10 @@
stm_led=1;
wait(1);
pc.printf("Atempting to send command\r");
+
+ bluetooth.printf("$$$$\r");
+ wait(1);
+
bluetooth_command("RESTORE");
debug&=bluetooth_command("SET NAME=BC127 BLE");
debug&=bluetooth_command("SET NAME_SHORT=BCBLE");