Raspberry Pi Pico and HC-SR04 with protected Echo input A canonical horizontal Raspberry Pi Pico on a landscape breadboard powers an HC-SR04 from VBUS, sends Trigger on GP19, and receives Echo on GP18 through a one-kilohm and two-kilohm voltage divider. All shown contacts use exact breadboard holes. VCCTRIG ECHOGND HC-SR04 distance sensor · protected Echo Exact breadboard placement for code/day-4/01_distance_sensor.py + 5 V · VBUS unused a b c d e CENTRE CHANNEL f g h i j + GND 5 V · VBUS BOOTSEL VBUS VSYS GND 3V3_EN 3V3 ADC_VREF 28 AGND 27 26 RUN 22 GND 21 20 19 18 GND 17 16 0 1 GND 2 3 4 5 GND 6 7 8 9 GND 10 11 12 13 GND 14 15 5 V GND GP19 Trig GP18 Echo 1 kΩ 2 kΩ Before connecting USB ✓ Echo reaches GP18 only through the 1 kΩ / 2 kΩ divider. ✓ HC-SR04 VCC uses VBUS / 5 V, never a GPIO. ✓ HC-SR04 GND and divider GND share the Pico ground. ✓ One contact per visible hole; disconnect USB while wiring.
Original course artwork informed by the official Freenove ultrasonic-ranging lesson. It matches code/day-4/01_distance_sensor.py and intentionally replaces the official direct Echo wire with a safe divider. Every shown contact uses its own visible, exact breadboard hole.

Exact connection list

FromThroughTo
Pico VBUS / 5 V, physical pin 40 top 5 V rail and rail jumper to bottom 5 V rail HC-SR04 VCC
Pico GP19, physical pin 25 yellow Trigger jumper HC-SR04 Trig
HC-SR04 Echo 1 kΩ resistor divider junction and Pico GP18, physical pin 24
divider junction 2 kΩ resistor bottom GND rail
HC-SR04 GND bottom GND rail Pico GND, physical pin 13