🛠 Diffuser une fréquence cardiaque BLE vers nRF Toolbox

nRF52840-MDK (boards.json id: nrf52840-mdk) · debutant · La démo phare du wiki MakerDiary : un flash, un smartphone, et la courbe cardiaque apparaît dans l'app Nordic — la chaîne BLE complète validée.

The objective

Flash the Nordic "heart rate" example (standard GATT Heart Rate service) onto the nRF52840-MDK, then observe the simulated heart rate curve in the nRF Toolbox mobile app. This is the flagship demo of the MakerDiary wiki: it validates the entire chain — SDK, SoftDevice S140, mergehex, drag-and-drop flashing, and BLE radio.

Prerequisites

git clone https://github.com/makerdiary/nrf52840-mdk.git
cd nrf52840-mdk

Step 1 — Compile ble_app_hrs

make BOARD=nrf52840_mdk -C examples/nrf5-sdk/ble_app_hrs/s140/nrf52840

The application hex file is output to the example's _build/ folder. Note: The MakerDiary repository has not been updated since 2021; if compilation fails, ensure you are using SDK 17.0.x with the SoftDevice S140 6.1.1 expected by the Makefiles.

Step 2 — Merge and flash

The BLE stack requires the SoftDevice S140. Merge the two hex files, then drop the image onto the DAPLINK drive:

mergehex -m s140_nrf52_6.1.1_softdevice.hex \
           _build/ble_app_hrs_nrf52840_mdk.hex \
         -o firmware.hex

Drop firmware.hex onto the DAPLINK drive, then press Boot/Reset.

Step 3 — Connect with nRF Toolbox

  1. Install nRF Toolbox (Android/iOS) and open the Heart Rate module.
  2. Start a scan: the device appears (advertising name Nordic_HRM).
  3. Connect: the simulated heart rate curve updates via BLE notifications.

What this demo teaches you

Zephyr Alternative

The upstream Zephyr peripheral_hr sample also works on the board, but the MakerDiary port is outdated: it no longer compiles with Zephyr 3.5+ (issue #55). Use the current version from the Zephyr tree (west build -b nrf52840_mdk samples/bluetooth/peripheral_hr) rather than the one from the repository.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials