BLE Blinky Example¶
Description¶
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.
Tip
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:
cd ./examples/nrf5-sdk/ble_app_blinky/armgcc
Run make merge to build the application and merge with the Softdevice:
make merge
Programming the firmware¶
If compiled successfully, the firmware is located in ble_app_blinky/armgcc/_build with the name nrf52840_xxaa_s140.hex.
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:
make flash_all
Tip
See Programming section for details about how to program the nRF52840 M.2 Module.
Testing¶
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 CharacteristicandLED State Characteristic. -
Enable
Notifyon theButton State Characteristic. Notifications are received when pressing or releasing the USER Button. -
Write
01to theLED State Characteristicand observe that GREEN LED is turned on. -
Write
00to theLED 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:
