How to detect the difference between a Pico and a Pico W #RaspberryPiPico #RaspberryPi @Raspberry_pi
An interesting question: can code determine if it’s running on a Raspberry Pi Pico or a Pico W with WiFi?
Hardware-wise, both boards are nearly identical. But there are a couple subtle differences. And the onboard LED is connected differently.
On GitHub in the Earle Philhower repository for an Arduino Pico core, the question came up back in September. It was discussed and solutions offered with @dlkeng coming up with a solution implemented.
Earl has incorporated this into the code with the rp2040.isPicoW() function. This makes it easy for anyone using Earle’s core to determine at runtime which board is running the code. Thus a blink sketch can be crafted for either board, code can determine if the WiFi peripheral is present and act appropriately, etc.
There is a downside: “universal code” must be compiled for the Pico W (the “beefier” variant), adding in the WiFi overhead.
You can read about this in the thread here and see the pull request here.
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!
Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi
EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey