BLE Advertising¶
Overview¶
The BLE Advertising sample demonstrates the BLE Advertising functionality using the adafruit_ble
module.
When the code starts, nRF52840 Connect Kit will advertise with its name.
Tip
adafruit_ble
is pre-built into CircuitPython as a frozen module, so that it can be imported in the code directly.
Requirements¶
Before you start, check that you have the required hardware and software:
- nRF52840 Connect Kit running the CircuitPython firmware
- 1x USB-C Cable
- A smartphone or a tablet with nRF Connect for Mobile installed
- Mu Editor
- A computer running macOS, Linux, or Windows 7 or newer
Running the code¶
To run the code, complete the following steps:
- Connect nRF52840 Connect Kit to your computer using the USB-C Cable.
- Start Mu Editor, click Load to open
code.py
in the CIRCUITPY drive. -
Copy and paste the following code into
code.py
and click Save: -
Your code will run as soon as the file is done saving. Start the nRF Connect for Mobile app, scan the device and observe that the board is advertising with the Device Name
nRF52840 Connect Kit
.