Demonstration code showing how to control an LED over Bluetooth Low Energy using the UARTService
Dependencies: BLE_API mbed nRF51822
Fork of BLE_LoopbackUART by
This programme demonstrates the use of the UARTService to send command strings over Bluetooth Low Energy (BLE) to control devices attached to the nRF51822 board.
In this example you can use a BLE connection from smart phone to turn on and off LED2 on the board.
Sending the character string "led2 on" will turn the LED on and "led2 off" will turn it off.
The command that is received is also echoed back via BLE to the sending device.
You can use the nRF UART App on and Android or iOS smart phone with BLE to test this out https://www.nordicsemi.com/eng/Products/nRFready-Demo-APPS
I have also ported the source code for the Android app into Android studio which should be a good starting point for developing your own custom App https://github.com/bennthomsen/nRF_UART. If you want to start using this within Android Studio create for own fork in GitHub and then from within Android Studio VCS>Checkout from Version Control>GitHub
Revisions of main.cpp
Revision | Date | Message | Actions |
---|---|---|---|
15:2a9916011a2a | 2015-01-02 | Line 85: was edited to include: | File Diff Annotate |
14:8ff3bfb6b19d | 2014-12-17 | Removed unnecessary code.; Turned console DEBUG off | File Diff Annotate |
13:291a8f177400 | 2014-12-17 | modified to control LED2 by sending commands over BLE; "led2 on" turns LED2 on; "led2 off" turns LED2 off; | File Diff Annotate |
12:36a9f01cfa0a | 2014-12-17 | Initial Commit: Added comments | File Diff Annotate |
10:633cec718bf4 | 2014-11-28 | updating to 0.2.5 of the BLE_API | File Diff Annotate |
6:e0fc9072e853 | 2014-09-22 | updating to 0.2.0 of the BLE_API | File Diff Annotate |
5:4bc41267a03a | 2014-09-02 | updating underlying libraries. | File Diff Annotate |
2:e060367b9024 | 2014-06-13 | update demo to use the new APIs; we have it working now. | File Diff Annotate |
0:e910d9bb040f | 2014-05-26 | initial | File Diff Annotate |