Combined Raspberry Pi Pico HC-SR04 and passive buzzer proximity alarm A canonical horizontal Raspberry Pi Pico simultaneously operates an HC-SR04 on GP19 and protected GP18, and a passive buzzer through a one-kilohm GP15 S8050 transistor driver. VBUS supplies both five-volt loads, all grounds are common, and the program uses only the onboard LED. + + S8050 E B C VCCTRIG ECHOGND Proximity alarm · sensor and buzzer together Exact combined breadboard placement for code/day-4/03_proximity_alarm.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 GP18 GP15 1 kΩ 2 kΩ 1 kΩ GP19 pin 25 GP18 pin 24 · protected Echo flat face: E · B · C Visual output The program uses only the Pico's onboard LED. No external LED or LED resistor is required. Before connecting USB ✓ Echo has the 1 kΩ / 2 kΩ divider; no direct 5 V reaches GP18. ✓ Sensor GND, divider GND, and emitter E share Pico GND. ✓ GP19 = Trig, GP18 = Echo, GP15 = base control. ✓ One contact per visible hole; E/B/C order checked.
Original course artwork informed by the official Freenove ultrasonic-ranging and passive-buzzer lessons. It matches code/day-4/03_proximity_alarm.py, uses only the onboard LED, and gives every contact its own visible, exact breadboard hole.

Exact connection list

FromThroughTo
Pico VBUS / 5 V, physical pin 40 top 5 V rail; rail jumper also powers bottom 5 V rail HC-SR04 VCC and passive buzzer +
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
Pico GP15, physical pin 20 1 kΩ base resistor S8050 base B
passive buzzer − switched wire S8050 collector C
HC-SR04 GND, divider, and S8050 emitter E bottom GND rail Pico GND physical pin 13
visual indication Pico onboard LED controlled by Pin("LED") no external LED