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

MicroPython/ESP32-C3 + 1.8" 128x160 TFT ST7735 SPI, using boochow/MicroPython-ST7735 library.

CameraWebServe: ESP32-S3 (arduino-esp32) + OV5640 camera module