New Functionality: Bluetooth for Raspberry Pi Pico W
raspberrypi.comThis is the PR where the work is being merged into ‘upstream’ micropython for those who are interested. I have been following this side February. Very interesting to see https://github.com/micropython/micropython/pull/10739
It now has been merged! Nice
This is great! I think the rp2040 is moving towards being a very universal (and capable) platform for tinkerers who might have once reached for an Atmel based Arduino or an ESP32.
What are the benefits vs an esp32?
I think the PIO capability is something the ESP32s don't have. Other than that, I think the ESP32 is superior in basically every way.
There are already some cool projects using the PicoW bluetooth, I'm currently modifying https://github.com/DavidPagels/retro-pico-switch to try and make a custom controller from scratch. Hopefully it'll get far enough to push to github at some point.
This is really cool, I love the stuff that becomes possible with BLE support.
With ESPHome now supported on Picos (and other RP2040-based boards) this is an exciting time to be a home automation geek.
It’s been possible to use Bluetooth for a while, but a bug prevented Bluetooth and Wifi from running stably at the same time.
I threw together a Bluetooth speaker firmware - for some of our (Pimoroni) boards - with FFT visualisation quite some months ago - https://github.com/Gadgetoid/galactic-bluetooth-audio
Album art display is also possible but small matrix displays don’t lend themselves well to it - https://github.com/Gadgetoid/galactic-bluetooth-audio/pull/1...
As well as the BLE/WiFi issue, there was another defect that prevented some devices from connecting to the Pico W over BLE reliably. Both have been resolved with this release.
Oh great! I just received a batch of Pico Ws and felt there may be BT functionality under the shield. Broadcom has incorporated into all their wifi chips even if it's not used/not connected.
The blog post accompanying the release of the Pico W gave the part number of the Infineon wireless chip used by the Pico W, acknowledged the Bluetooth capability of the chip and stated it might be enabled in the future. I'm at a bit of a loss to your reference to Broadcom chips since the Pico W doesn't utilize Broadcom chips.
The RP2040 is very popular with Nintendo Switch modchips these days. I wonder Bluetooth makes these chips even better for the purpose (OTA updates?).
Somehow I missed the release of the pico. Has anyone played with one? What's it like to tinker with compared to a pi zero or a full sized pi?
Completely different device for a different set of use cases.
Precisely. It’s best to think of it as a dedicated and customisable IoT device.
I put one in my coffee machine, for example, so that I can turn it on/off remotely or on a schedule, as well as read the grinder value much more precisely (5V potentiometer) than the number the machine provides (1-45).
Wow, that's a super cool use case! I'm super interested in "smart-ifying" things by being able to measure them/read state remotely as opposed to controlling them. This sounds like it might be really useful for that!
Absolutely. It has 4x 10-bit ADCs built in, so precise measurement is quite easy. I used a voltage divider to change the range from 5V to 3.3V.
As mentioned in other comments, the Pico has two cores, so I’m actually running the small web server (for phone GUI) in a thread directly on the second core, meaning there’s never a time where I’m running code that could block web service. The grinder value gets updated 10x per second on the webpage via ajax, so it feels really responsive on your phone but doesn’t have to reload the page. I want to add a little oled to the coffee machine to show the output directly too. It’s a great little device.
I’ll be open sourcing the code in the future on GitHub once I’ve worked a few more issues out (my handle is CodeByMiles).
The MicroPython threading support is apparently "highly experimental" according to the docs [1]. Did you use another language, or does the threading in MicroPython work well despite being experimental?
[1] https://docs.micropython.org/en/latest/library/_thread.html
I am not OP, but, I have successfully used the Micropython multithreading support. I believe it is marked as such in the docs since they are reserving the right to change the API, not because it doesn't work.
That said, I've generally found the C SDK easier to work in. Copying large micropython libraries over USB to the Pico on OSX has been a massive headache.
What are you using to transfer the files? I'd be very keen to know if there are issues with the (officially supported) mpremote...
Correct, I just used the micropython implementation. So long as I could get it to work in my individual use case it was ok by me, and indeed I had no real trouble getting it to work.
Thanks! So is this more like an arduino then?
It's more like an Arduino in the sense that the code you write is more like firmware.
It's way more powerful than a common Arduino, though. It has two 32-bit (ARM Cortex-M0+) cores, 264kB of RAM, and 2MB of flash. The Pico W also has a wireless chip that can do WiFi and Bluetooth (the standard Pico is exactly the same without the wireless chip).
I see, so it's kinda halfway between a standard Pi and an arduino then? You can code on it, but it can't run an OS or anything?
That still seems suuuuper useful. I'm going to have to give that a look, thanks for the info!
> You can code on it, but it can't run an OS or anything?
You can run small embedded RTOSes such as FreeRTOS and NuttX and others I'm not aware of on it. Nothing like the desktop Linux that runs on the bigger raspberries, still very useful for development.
https://github.com/smittytone/RP2040-FreeRTOS
https://nuttx.apache.org/docs/latest/platforms/arm/rp2040/in...
To pile on the list of supported RTOSes, my favorite has supported the Pi pico for a while.
https://docs.zephyrproject.org/latest/boards/arm/rpi_pico/do...
It is big enough that it makes sense to run some kind of small RTOS on it, especially given the dual core nature of the thing.
Extremely awesome. I have a lot of Pico W projects that send very minimal wifi data and could benefit from the reduced power consumption of BT.
I did not know it has a Bluetooth chip
The W model has Bluetooth, the plain version RP Pico 2040 version does not. BT has always been possible to use but under a non commercial license.
It shipped with the hardware, albeit unused. They always intended to go back and add Bluetooth support, so it’s nice it’s here now.
Isn't BlueTooth the same spectrum as WiFi so if your chip can do WiFi it should be able to do BlueTooth?
Different Media Access Control and framing. They're only borderline related, even in terms of radio channel definitions (they overlap in the 2.4GHz frequency range, but are incompatible).
Your microwave oven is around the same spectrum(2.45GHz). Doesn't mean that it will be able to transmit WiFi or Bluetooth, but it might interfere with both.
Technically, if it is just "a fancy SDR" and not some hardware dedicated just for WiFi