Adafruit Bluefruit with KL25Z sending MMA8451Q acceleration data over BLE UART to Nordic oder Adafruit app
Dependencies: BLE_nRF8001 MMA8451Q mbed
Fork of BLE_KL25_nRF8001 by
Diff: main.cpp
- Revision:
- 3:b5dc2454dfc3
- Parent:
- 2:e6d7390d4429
- Child:
- 4:fb6008860882
--- a/main.cpp Thu Mar 09 22:39:56 2017 +0000 +++ b/main.cpp Thu Mar 09 23:06:15 2017 +0000 @@ -33,6 +33,8 @@ // The SPI construct, REQN and RDYN IO construct should be modified manually // It depend on the board you are using and the REQN&RDYN configuration on BLE Shield // config for KL25Z +// VIN to 5V on KL25 +// GND to GND on KL25 SPI spi(PTD2, PTD3, PTD1); // MOSI , MISO , SCLK DigitalInOut BLE_RDY(PTD5); // DigitalInOut BLE_REQ(PTD0); // @@ -46,11 +48,13 @@ BLEPeripheral blePeripheral = BLEPeripheral(&BLE_REQ, &BLE_RDY, &BLE_RESET); // create service -BLEService uartService = BLEService("6e400001b5a3f393e0a9e50e24dcca9e"); - +// uart characteristics from NORDIC works with NORDIC Apps +BLEService uartService = BLEService("713d0000503e4c75ba943148f18d941e"); +// redbear uuid for uart 713d0000503e4c75ba943148f18d941e for redbearlabs app +// nordic uuid for uart 6e400001b5a3f393e0a9e50e24dcca9e for nordic app // create characteristic -BLECharacteristic txCharacteristic = BLECharacteristic("6e400001b5a3f393e0a9e50e24dcca9e", BLENotify, 20); -BLECharacteristic rxCharacteristic = BLECharacteristic("6e400001b5a3f393e0a9e50e24dcca9e", BLEWriteWithoutResponse, 20); +BLECharacteristic txCharacteristic = BLECharacteristic("713d0000503e4c75ba943148f18d941e", BLENotify, 20); +BLECharacteristic rxCharacteristic = BLECharacteristic("713d0000503e4c75ba943148f18d941e", BLEWriteWithoutResponse, 20); /*--------------------------------------------------------------------------------------------*/ unsigned int interval = 0;