A DIY security system with an HC-SR501 PIR sensor. On motion, the OLED runs a sliding “INTRUDER” alert with a flashing effect and the LED fires; after 2 seconds of stillness it returns to “All Clear”.

Objectives: Wire and tune a PIR sensor · Understand warm-up time and retrigger behaviour · Build timed state logic · Animate alerts on OLED

Components: Arduino Uno · PIR HC-SR501 · SSD1306 OLED · LED + 220Ω resistor

Libraries:

  • Adafruit SSD1306
  • Adafruit GFX

Code: https://github.com/Arun-Roshan/PIR-Motion-Detection-Security-System-with-OLED-Animation—Arduino.git — PIR Motion repo