Software: UART Service

Most people understand the basic concept behind UART (one channel to transmit data and one to receive it), so this felt like the easiest way to provide flexible, bi-directional communication between an Arduino and any BLE-enabled mobile platform, without painting people into the corner. BLE does have the capability to handle more complicated structured data, but for the vast majority of people doing projects, UART will get you very very far.

To save everyone the headache of defining and working with custom services, we've wrapped up all of the low level BLE code into a single, easy to use class called Adafruit_BLE_UART, available in the nRF8001 / Adafruit_BLE_UART repository on Github
Download the ZIP file by clicking on the button above, uncompress and rename the folder to Adafruit_BLE_UART. Make sure it contains Adafruit_BLE_UART.cpp and Adafruit_BLE_UART.h. Then place the Adafruit_BLE_UART folder inside your Arduino libraries folder and restart the Arduino IDE. If this is all unfamiliar, we have a tutorial introducing Arduino library concepts and installation.
Restart the Arduino IDE and then open the 'uart' example via the 'File > Examples > Adafruit_BLE_UART> echoDemo ' menu item. (The library was renamed from Adafruit_nRF8001 to avoid confusion with the underlying library so the screenshot above is mismatched)

If you upload the demo to your wired-up Arduino and open the serial monitor you should see that it starts advertising BLE signal
Next up we will use our iOS or Android device to make the other side of the connection!
Last updated on 2015-11-20 at 02.51.33 PM Published on 2014-03-20 at 03.59.29 PM