Adafruit Bluefruit with KL25Z

Dependencies:   BLE_nRF8001 mbed

Simple implementation of UART on FRDM KL25Z board with nRF8001 Adafruit breakout. Uses RedBearLabs Library and could be made to work with their BLE Shield.

UART Characteristics can be changed to work with either RedBearLabs BLE Controller app or using the Nordic settings the nRF apps or the Adafruit Bluefruit LE apps.

Revision:
4:fb6008860882
Parent:
3:b5dc2454dfc3
Child:
5:83be623f6ad4
--- a/main.cpp	Thu Mar 09 23:06:15 2017 +0000
+++ b/main.cpp	Fri Mar 10 13:20:55 2017 +0000
@@ -43,18 +43,16 @@
 unsigned char txbuf[16] = {0};
 unsigned char txlen = 0;
 
-/*----- BLE Utility -------------------------------------------------------------------------*/
+//*----- BLE Utility -------------------------------------------------------------------------*/
 // create peripheral instance, see pinouts above
-BLEPeripheral            blePeripheral        = BLEPeripheral(&BLE_REQ, &BLE_RDY, &BLE_RESET);
-
+BLEPeripheral            blePeripheral        = BLEPeripheral(&BLE_REQ, &BLE_RDY, NULL);
+ 
 // create service
-// 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("713d0000503e4c75ba943148f18d941e", BLENotify, 20);
-BLECharacteristic    rxCharacteristic = BLECharacteristic("713d0000503e4c75ba943148f18d941e", BLEWriteWithoutResponse, 20);
+BLECharacteristic    txCharacteristic = BLECharacteristic("713d0002503e4c75ba943148f18d941e", BLENotify, 20);
+BLECharacteristic    rxCharacteristic = BLECharacteristic("713d0003503e4c75ba943148f18d941e", BLEWriteWithoutResponse, 20);
 /*--------------------------------------------------------------------------------------------*/
 
 unsigned int interval = 0;