Pico hardware bench
Turn a Raspberry Pi Pico (or an ESP32) running stock MicroPython into a bench tool driven from the browser — GPIO and PWM, an I²C scanner with register reads, SPI with flash JEDEC ID decoding, a UART bridge, 1-Wire thermometers, a live ADC plot, a PS/2 keyboard sniffer, and a PIO logic capture that opens in the logic analyser. No custom firmware.
Added
Works with
- Logic analyser IoT and embeddedOpen in logic analyser hands it the PIO capture, with channels named for its decoders
- I²C address finder IoT and embeddedPlan this bus opens the address finder with the devices a scan found
How to use it
A Pico costs less than a cheap USB logic analyser and has I²C, SPI, UARTs, an ADC and eight PIO state machines. With the official MicroPython firmware on it, this page drives all of that over USB: every button sends a few lines of Python to the board’s raw REPL and reads the answer back. There is nothing to compile or install on the board beyond MicroPython itself, and nothing is written to its flash.
How to use it
-
Put MicroPython on the board (the Setup tab has the links). Download the UF2 for your board from micropython.org, hold BOOTSEL while plugging the Pico in, and drag the file onto the
RPI-RP2(Pico 2:RP2350) drive that appears. The page can’t do this step: a browser isn’t allowed to copy a file onto a USB drive by itself. For an ESP32, flash the MicroPython.binat 0x1000 with the ESP flasher. -
Connect board and choose the port. The page stops whatever is running (Ctrl-C) and enters the raw REPL. It then asks the board what it is and picks the right pin map: Pico (RP2040), Pico 2 (RP2350) or ESP32. Python sent to the board shows exactly what each button ran.
-
Use the tabs:
-
GPIO — a drawing of the Pico’s header; click a pin to drive it high or low, read it with a pull-up or pull-down, or start PWM (frequency and duty). Read every pin reads all levels without changing any pin’s mode. The page warns which pins share a PWM slice (and so a frequency).
-
I²C — pick SDA and SCL by clicking pins (the hardware block is worked out from the pins, or tick software I²C for any pair), scan, and see an address map with likely parts from the I²C address finder's list. Read and write registers (8- or 16-bit register addresses, so EEPROMs work) and dump all 256 registers. Plan this bus in the I²C address finder opens that tool with the parts you chose for each address.
-
SPI — choose the four pins, the mode and the clock; Read JEDEC ID sends 9Fh and decodes the manufacturer, the part (for about 70 common W25Q, MX25, GD25, IS25, AT25, SST26 and similar parts) and the capacity, and explains an all-FF or all-00 answer. Transfer sends any bytes and shows what came back.
-
UART — a second UART on the pins you choose, bridged to a terminal on the page (text or hex, your choice of line ending). Bytes travel to the board as hex lines, so a 0x03 in your data can’t interrupt the REPL.
-
1-Wire — search the bus for ROMs (family, serial and CRC check) and read every DS18B20, DS18S20, DS1822 or MAX31850 at once, optionally every 2.5 seconds.
-
ADC — plot GP26–28 and the internal temperature sensor live at 10–2000 samples per second, and download the samples as CSV.
-
PS/2 — sniff a keyboard’s scan codes on two pins. On a Pico a PIO state machine samples DATA on every falling CLOCK edge, so no frame is lost; the pin-interrupt mode also works on an ESP32. Each byte is checked (start, odd parity, stop), decoded from scan code set 2, and turned into typed text (US layout). PS/2 is a 5 V bus — use a level shifter.
-
Logic capture — sample 1, 2, 4 or 8 consecutive pins at up to 25 MHz with a PIO program (with an optional rising- or falling-edge trigger) into a buffer of up to 64 KB, moved by DMA on MicroPython 1.22 and later. The capture comes back over USB, is drawn on the page, and Open in logic analyser opens it in the logic analyser with the channels named after the pins the other tabs use (SDA, SCL, SCK, TX…), so its I²C, SPI and UART decoders set themselves up. Download raw .bin saves one byte per sample, which the analyser also opens.
-
Console — run your own Python and watch the output stream; Stop sends Ctrl-C.
-
Simulated Pico runs every tab without hardware. The pretend board has a BME280, an SSD1306, a DS3231 and an AT24C32 EEPROM on I²C (GP4/GP5), a W25Q64 flash on SPI0 (GP16–19), a GPS sending NMEA at 9600 baud on UART0 (GP0/GP1), jumpers from GP8 to GP9 and from GP14 to GP15, two DS18B20 on GP2, a sine wave and a ramp on the ADC pins, and a PS/2 keyboard typing on GP6/GP7. It speaks the same raw REPL byte protocol as a real board, so the page’s protocol code is exercised as well.
How it talks to the board
MicroPython’s raw REPL is the same channel mpremote and Thonny use. Ctrl-A switches it on. For
each command the page asks for raw-paste mode (Ctrl-E, A, Ctrl-A): the board answers with a
window size and sends a byte each time it has room for another window, so a long snippet never
overruns its input buffer. Older firmware that doesn’t know raw-paste gets the code in 256-byte
chunks instead. The board’s output comes back as stdout, a Ctrl-D, stderr and another Ctrl-D, and
errors are turned into a plain explanation (no device at that address, the bus timed out, a pin
that can’t carry that signal, a missing module). Disconnecting sends Ctrl-B, which returns the
board to its normal >>> prompt.
Safety
-
The Pico is a 3.3 V part. RP2040 pins are not 5 V tolerant; RP2350 digital pins tolerate 5 V only while powered, and its ADC pins never do. Put a level shifter between the Pico and 5 V circuits — the logic levels tool picks one and checks the margins.
-
I²C needs pull-ups (2.2–4.7 kΩ to 3.3 V; most breakout boards have them) and 1-Wire needs 4.7 kΩ from DQ to 3.3 V.
-
Keep each pin under about 12 mA. Never connect an output to another output, and connect the grounds of everything you probe.
Browser support
Web Serial is in desktop Chrome, Edge and Opera only — not Safari, Firefox or phones. Without it
the page still opens and the simulated Pico works. Only one program can open the board’s port at a
time, so close Thonny, mpremote or a serial terminal first. The pin
drawings follow the pinout explorer.
What I have not tested on hardware: the page has been checked against the simulated board and a fake Web Serial device that speaks the raw REPL, not against a physical Pico or ESP32. The generated Python is checked for syntax, but MicroPython details (PIO, DMA and pin-interrupt timing in particular) may need adjusting on a real board. If something misbehaves, the snippet is under Python sent to the board. Please tell me what happened.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.