BlueTooth on Pi Pico W - WORKING!

BlueTooth now working on Pi Pico with MicroPython. See here:

Unfortunately, the code has been printed with line numbers so a great deal of line number editing out is required. Good news it that it works.

I’ve got my phone receiving data from the Pico via Bluetooth.

1 Like

I’ve found the official files on-line and they can be downloaded from here:

Give it a try - works really well.

Help needed. How can we send/receive text strings of different length instead of just a pair of bytes?

Well, BLE is more than a data-transmission protocol, it is a complicated stack of things they call profiles, services, characteristics, central devices, peripherals, servers, clients and so on. It took me quite some time to figure out the language BLE is using. After that, I began to understand the example programs you find in the internet.

I think what you are looking for is NUS, the “Nordic UART service”. This implements a serial connection over BLE. With it you can send and receive arbitrary data. Although this is against the design of BLE. But it is very practical and lets you port old stuff easily.

I did some BLE programming with the Pi and the nRF52840 (XIAO nRF52840) using CircuitPython and it was not that complicated (they have good libraries and sample code).

So I am waiting until the Pico-W port of CircuitPython supports BLE, and the all these programs will just run on.

You can find my uart-examples here: GitHub - bablokb/ble-playground: Bluetooth Low Energy Playground

Thanks. I’ve used those with a Pi at Pi Jams. Just want to try the latest offerings.

I’ve just found these examples:

It helps to start with something that works. These are less complicated - fewer looping delays and flashing LEDs.

Got the basic stuff working - LED brightness controlled by potentiometer on another PiCow.

Just finished a Pico W project. Data from 3 potentiometers on one Pico W sending data to a second Pico W to control colours on a NeoPixel stick.

Watch the video here:https: //youtu.be/V7spAtwrQIY

All done with MicroPython.

Do you have any power-measurements? BLE should be up to a factor 1000 less than WLAN, but this assumes that the WLAN-part of the cy43439 is turned off and I am not sure how this is implemented in MicroPython.

Hi Bernhard
Sorry, but that is a tad too technical for me as I trained as a mathematics/physics teacher in the early 60’s and converted to Computer Science soon after. I did a MSc in Computer Education in the 80’s at Loughbrough University, mainly programming. I’ve only got a soldering iron, side-cutters and a multi-meter! All my electronics knowledge is self taught.
The picture above from my phone records -50dBm.

The code and instructions to my project can be found here if you would like to try it: