rpi-pico-w/upython/adc.py 2025-07-27
The program continuously prints to the USB the value of the ADC on GPIO 26 once every 0.2 seconds.
The onboard LED is blinked as a heartbeat.
The hello world is with a potentiometer: extremes on GND and VCC pins of the Pi, and middle output on pin GIO26, then as you turn the knob, the uart value goes from about 0 to about 64k.
The 0 side is quite noisy and varies between 0 and 300 for some reason.
In Ciro's ASCII art circuit diagram notation:
RPI_PICO_W__gnd__gpio26__5v
            |    |       |
            |    |       |
            |    |       |
         P__1____2_______3
micropython/blink_gpio.py 2025-07-27
Run Zephyr on Micro Bit 2025-07-27
Build worked:
west build -d build/microbit/hello_world -b bbc_microbit samples/hello_world
but flash failed:
west flash -d build/microbit/hello_world
Related: mattoppenheim.com/2018/06/24/using-udev-to-remove-the-need-for-sudo-with-the-bbc-microbit
The build also generates a .hex file by default, and we've tried to flash it manually with:
cp build/microbit/hello_world/zephyr/zephyr.hex /media/ciro/MICROBIT/
but we failed to see it do anything with zephyr/blink_gpio.c, so not sure if the flashing was broken or if the code was broken, or if we didn't find the IO pins correctly.
Any print() command ends up on the USB, and is shown on the computer via programs such as ampy get back.
However, you can also send data over actual UART.
We connect Pin 0 (TX), Pin 1 (RX) and Pin 2 (GND) to the DSD TECH, and the USB to the Ubuntu 25.04 host laptop.
Then on the host laptop I run:
screen /dev/ttyUSB0 9600
and a counter shows up there just fine!
rpi-pico-w/upython/blink_gpio.py Created 2025-07-26 Updated 2025-07-27
Blink on-board LED. Note that they broke the LED hello world compatibility from non-W to W for God's sake!!!
The MicroPython code needs to be changed from the Raspberry Pi Pico 1, forums.raspberrypi.com/viewtopic.php?p=2016234#p2016234 comments:
Unlike the original Raspberry Pi Pico, the on-board LED on Pico W is not connected to a pin on RP2040, but instead to a GPIO pin on the wireless chip.
picotool 2025-07-26
Tested on Ubuntu 25.04,
sudo apt install libusb-1.0-0-dev
git clone https://github.com/raspberrypi/pico-sdk
git clone https://github.com/raspberrypi/picotool
cd picotool
git checkout de8ae5ac334e1126993f72a5c67949712fd1e1a4
export PICO_SDK_PATH="$(pwd)/../pico-sdk"
mkdir build
cd build
cmake ..
cmake --build . -- -j"$(npro)" VERBOSE=1
and the executable is there under build/picotool so copy it somewhere in your PATH like:
cp picotool ~/bin
and then trying to use a Zephyr example:
sudo ~/bin/picotool load -f build/zephyr/zephyr.uf2
fails with:
No accessible RP2040 devices in BOOTSEL mode were found
TODO: how to avoid that? youtu.be/tRXLxrtfU_s?t=207 gives a workaround if you are using the Pico SDK by adding to CMakeLists.txt:
pico_enable_stdio_usb(blink 1)
but how to do it in Zephyr? Video description says:
make sure that your program initializes the USB code via a call to "stdio_init_all()".
but again how to do that from Zephyr? It appears that this only works if the code currently running has support for the feature:
Video 1.
Never unplug your Raspberry Pi Pico again by deltocode
. Source.
The Zephir LED blinker example does not work on the Raspberry Pi Pico W because the on-board LED is wired differently. But the hello world works and with:
screen /dev/ttyUSB0 115200
host shows:
*** Booting Zephyr OS build v4.2.0-491-g47b07e5a09ef ***
Hello World! rpi_pico/rp2040
Nice!
Raspberry Pi Pico 1 2025-07-26
This section is about the original Raspberry Pi Pico board. The "1" was added retroactively to the name as more boards were released and "Raspberry Pi Pico" became a generic name for the brand.

There are unlisted articles, also show them or only show them.