Raspberry Pi Halloween Pumpkins Motion Sensor

Опубликовано: 01 Март 2026
на канале: Andrew Oakley
360
7

See more Raspberry Pi projects at Cotswold Jam, Saturday 24 November, Cheltenham UK - free tickets from http://www.cotswoldjam.org

A fun Raspberry Pi project using a short string of WS281x addressable coloured LEDs. The Pi also has a HC-SR501 passive infra-red (PIR) movement sensor and a USB sound card. Normally the pumpkin lights cycle through a calm redish sequence. When children approach, the lights turn to an aggressive blue sequence, and the external speaker plays a random spooky sound sample!

Note that an external USB sound card is required (£2 from China) because the Raspberry Pi cannot control lights with Pulse Width Modulation (PWM) and drive analogue audio at the same time.