From c7045e25769b05d46f140256555c20c0fab62091 Mon Sep 17 00:00:00 2001 From: msekar Date: Wed, 20 Jan 2016 23:17:10 +0100 Subject: [PATCH] RFduino BLE comm --- ble.ino | 17 +++++++++++++++++ 1 file changed, 17 insertions(+), 0 deletions(-) create mode 100644 ble.ino diff --git a/ble.ino b/ble.ino new file mode 100644 index 0000000..f58137c --- /dev/null +++ b/ble.ino @@ -0,0 +1,17 @@ +void blesetup(){ + RFduinoBLE.advertisementData = "Hello"; // shouldnt be more than 10 characters long + RFduinoBLE.deviceName = "RF J"; // name of your RFduino. Will appear when other BLE enabled devices search for it + RFduinoBLE.begin(); // begin +} + +void sendDataBLE(int lap, int lapTime, int isEnd){ + char chr[20]; + String str1, str2, str3, strAll; + str1=String(lap); + str2=String(lapTime); + str3=String(isEnd); + strAll=str3+";"+str1+";"+str2; + strAll.toCharArray(chr, 20); + RFduinoBLE.send(chr, strAll.length()); + //RFduino_ULPDelay(3000); +} \ No newline at end of file -- libgit2 0.21.2