

We’ll also need to do a little soldering, so you’re going to want a soldering iron and solder. A power supply for the Pi (Raspberry Pi 4 requires a different USB C power supply).Some Loctite Fun Tak or similar mounting putty (to hold things in place).A pair of jumper wires (either male to female or female to female - doesn’t matter as we’ll be cutting one end off to solder to the door sensor wires, so you just need one female end to attach to the Pi GPIO headers without soldering them).A small model car - I’m using a Pixar Cars Mazda Miata :), anything Hotwheels or similar will do.A Raspberry Pi with SD card and OS installed - I’m using the Pi 3, but any model with GPIO headers will do (unless you fancy some extra soldering then you could use the Pi Zero etc).We’ll need a few things to build this out, which are… Ingredients you will need! If you’ve read my previous Raspberry Pi post, you’ll know I have a few sets of traffic light LEDs, so I thought I’d see if I could do something with these and a door sensor… Shopping List As the magnet in the part that you’d normally attach to a door moves away (because the door swings open), the switch circuit opens. I recently noticed that Adafruit sells low cost ($3.95) wired door sensors that basically act as a switch - if the magnet from one part of the sensor is placed in close proximity to the other part, the switch circuit closes.
