Settings

Theme

New Functionality: Bluetooth for Raspberry Pi Pico W

raspberrypi.com

151 points by crispinh 3 years ago · 40 comments

Reader

roywashere 3 years ago

This 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

noodlesUK 3 years ago

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.

  • ravetcofx 3 years ago

    What are the benefits vs an esp32?

    • jki275 3 years ago

      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.

Cieric 3 years ago

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.

  • stavros 3 years ago

    This is really cool, I love the stuff that becomes possible with BLE support.

spdustin 3 years ago

With ESPHome now supported on Picos (and other RP2040-based boards) this is an exciting time to be a home automation geek.

gadgetoid 3 years ago

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...

yardie 3 years ago

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.

  • tssva 3 years ago

    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.

Tepix 3 years ago

The RP2040 is very popular with Nintendo Switch modchips these days. I wonder Bluetooth makes these chips even better for the purpose (OTA updates?).

dabluecaboose 3 years ago

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?

  • HeyLaughingBoy 3 years ago

    Completely different device for a different set of use cases.

    • Daneel_ 3 years ago

      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).

      • dabluecaboose 3 years ago

        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!

        • Daneel_ 3 years ago

          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).

          • ptx 3 years ago

            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

            • cdcarter 3 years ago

              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.

              • matt_trentini 3 years ago

                What are you using to transfer the files? I'd be very keen to know if there are issues with the (officially supported) mpremote...

            • Daneel_ 3 years ago

              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.

    • dabluecaboose 3 years ago

      Thanks! So is this more like an arduino then?

devmor 3 years ago

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.

flangola7 3 years ago

I did not know it has a Bluetooth chip

  • pastage 3 years ago

    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.

  • Daneel_ 3 years ago

    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.

  • lesuorac 3 years ago

    Isn't BlueTooth the same spectrum as WiFi so if your chip can do WiFi it should be able to do BlueTooth?

    • rcarmo 3 years ago

      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).

    • martin8412 3 years ago

      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.

    • adql 3 years ago

      Technically, if it is just "a fancy SDR" and not some hardware dedicated just for WiFi

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection