With no trick or treating or Halloween parties allowed this year, I decided to decorate our front window. Of course, it needed some lights.

I started with a strip of 150 WS2812Bs connected to a Raspberry Pi. These are dead easy to connect with no soldering involved.

I coded an animation on the lights but then decided to add a little bit of interactivity. I had a lot of rules for the interaction.

  • No touching! No buttons or pads to touch and spread germs between my neighbours
  • No gathering. I didn't want any long animations that would cause crowds to gather. The path is narrow outside my house and there's no room to pass.
  • Waterproof. It's Yorkshire
  • Thief proof. It's Yorkshire. Just kidding. Anything within arms reach of the path will just be too tempting for strangers to pick up and look at. Me included.

With all that in mind, I went for a camera connected to the Raspberry Pi inside my house that would detect motion. It was untouchable, it will play a short animation, it's waterproof and thief proof.  

In the dark, of course there's not much motion it can detect! Except for light. So if you pass by my house shining a torch (or your phone light) at my window - it will set off the animation! If you're a big truck or tractor or my neighbour reversing their car into their driveway - that will set it off too!

Here's the video of me setting it off from the path.

Here's the code I used: https://github.com/Lorrainbow/HalloweenWindow/blob/main/README.md

This is pretty unique to my setup since it's using the numbering for how my lightstrip is laid out. But it uses multiprocessing to play the animation and look for movement with the camera at the same time. I also found the movement code difficult to find and out of date for python3.

Equipment list

I then added vinyl cut stickers to the rest of the window, some cobwebs, a cardboard box cut out in the shape of a spooky house and an off-the-shelf strip of LEDs from Amazon. These are 10 metres and are going around the window. They are remote controlled so I'm hoping to hack them with the Raspberry Pi shortly