A small fun project to create a Motion Detector to hide around the house and give the kids some enjoyment.

This is just a small project that makes use of:


  • Particle Photon board (You can use an Arduino - no code changes)
  • PIR Sensor
  • Small buzzer
  • 2 x LEDs
  • 1 x 220ohm resistors
  • A few jumper wires
  • A breadboard

And I used a toilet paper holder to make the motion detector field of view more narrow.


The code simply checks for movement. When movement is detected, we flash two LEDs, alternating. If you have a red and a blue, it resembles police lights flashing.


We also sound the buzzer as an audio indication. Just a quick beep, so as not to annoy us.


An issue I have is that I can't seem to get the buzzer to work of any other pin than D0, which I believe is actually reserved for TX/RX. Which means when you upload the code, you hear a faint buzzing on the speaker.