Prepare MicroPython Bluetooth service example on Raspberry Pi Pico W

With recent release of MicroPython firmware for Raspberry Pi Pico W, bluetooth is now supported. This video show steps to prepare Bluetooth service example on Raspberry Pi Pico W, with MicroPython v1.20.0 on 2023-06-27.


Refer to updated Connecting to the Internet with Raspberry Pi Pico W book (2023-06-14), chapters of Bluetooth added.

Read Chapter 6. Working with Bluetooth in MicroPython

Copy the code in 6.1. Advertsing a Bluetooth service (create a custom service in MicroPython and advertise it), save in Raspberry Pico Pi W, name "ble_advertising.py".

Copy the code in 6.2. An example Bluetooth service. This example demonstrates a simple temperature sensor peripheral. The sensor’s local value is updated every ten seconds, and any connected central device will be notified of the change.

In this example, read Temperature from machine.ADC(4), It's ADC connected to internal temperature sensor.

Then test with nRF Connect App.



Updated@2023-10-10:

Comments

Popular posts from this blog

480x320 TFT/ILI9488 SPI wih EP32C3 (arduino-esp32) using Arduino_GFX Library

my dev.tools - FNIRSI 2C23T 3-in-1 Dual Channel Oscilloscope/Multimeter/Signal Generator