BLE Blinky Example¶
The BLE Blinky Example uses the LED Button Service Server module. This module implements a custom LED Button Service with an LED and Button Characteristics that are used to toggle LEDs and receive button statuses from the nRF52840 M.2 module.
Before you start building, remember to set up the nRF5 SDK development environment first. See Setup the nRF5 SDK for details.
Building the example¶
You can find the source code and the project file of the example in the following folder: examples/nrf5-sdk/ble_app_blinky.
Open terminal and navigate to the directory with the example Makefile:
make merge to build the application and merge with the Softdevice:
Programming the firmware¶
If compiled successfully, the firmware is located in
ble_app_blinky/armgcc/_build with the name
Connect the debugger USB port to your PC using the provided USB-C Cable. A disk drive called M2-DOCK will be automatically detected by the computer.
Run the following command in
ble_app_blinky/armgcc to program the board:
See Programming section for details about how to program the nRF52840 M.2 Module.
You can test the example with the nRF Connect for Mobile app by performing the following steps:
Download the nRF Connect for Mobile from App Store or Google Play.
Connect to the device from nRF Connect (the device is advertising as Nordic_Blinky).
Observe the LEDs state. This indicates that the connections is established.
Observe that the
Nordic LED and Button Serviceis shown in the connected device. It contains two characteristics:
Button State Characteristicand
LED State Characteristic.
Button State Characteristic. Notifications are received when pressing or releasing the USER Button.
LED State Characteristicand observe that GREEN LED is turned on.
LED State Characteristicand observe that GREEN LED is turned off.
Create an Issue¶
Interested in contributing to this project? Want to report a bug? Feel free to click here: