A burglar alarm sketch! Either the PIR sensor or Ultrasonic Sensor can trigger the alarm. Demonstrates a combination of sensors and displays. The 7 Segment continuously displays Ultrasonic Sensor distance. The alarm consists of red/blue flashing lights and buzzer.
Built with the Makeblock Starter Robot Kit and the Electronic Add-on Pack. Orion Board: Ultrasonic on port 3; PIR sensor on port 4; 7 Segment Display on port 6; 4 RGB LEDs port 8.
Sorry for the video quality: https://www.youtube.com/watch?v=KBQpHREQ1DM
Robot kit - https://store.makeblock.com/starter-robot-kit
Add on Pack - https://store.makeblock.com/electronic-add-on-pack-for-starter-robot-kit
Arduino Sketch - https://github.com/javatechs/BurglarAlarm2