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:
- 5:ee564e17915b
- Parent:
- 4:51abc140d5d2
--- a/main.cpp Fri May 01 16:13:20 2015 +0000
+++ b/main.cpp Fri May 01 16:29:33 2015 +0000
@@ -1,17 +1,5 @@
#include "mbed.h"
#include<string>
-/*
-Consider adding:
-
-DEV_INFO =
-ACCESSORY_NAME=Arc Chest Strap
-MANUFACTURER_NAME=Aegle
-MODEL_NAME=Arc CS1
-SERIAL_NO=0000000000
-HARDWARE_VER=0 5 2
-FIRMWARE_VER=0 5 2
-*/
-
//LED
PwmOut stm_led(LED1);
//Bluetooth
@@ -26,8 +14,8 @@
char responseOk[4] = {'\r','\n','K','O'};
bool bluetooth_command(string command){
+ pc.printf("SENDING {%s}\r",command);
bluetooth.printf("%s\r",command);
- pc.printf("SENDING {%s}\r",command);
timeout.reset();
timeout.start();
while(timeout.read_ms()<2000){
@@ -63,6 +51,8 @@
wait(0.5);
bt_pair =0;
wait(0.5);
+ bluetooth.baud(9600);
+ wait(.1);
}
void readResponse(){
for(int z=2;z>0;z--){
@@ -86,10 +76,7 @@
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");
@@ -108,8 +95,6 @@
if(debug==true){
stm_led=!stm_led;
wait(2);
- //bluetooth.printf("SEND BLE HelloWorld\r");
- //Results in "ERROR" from BC127
}
}
}
\ No newline at end of file