Motion Sensor Alarm

Purpose:

  • to build and code a motion sensor alarm system
  • to learn how a motion sensor works

Procedure:

  1. Follow the steps in the pictures below to build the circuit, make sure to follow the steps closely as incorrect placement of the wires will mean that your circuit does not function properly
  2. Build a code, based on the sample code that allows you to make sound and makes the screen flash when the motion sensor is triggered
  • Connect a jumper wire from the 3V3 to row number 19
  • Connect a jumper wire from GND on the Microbit to row number 21
  • Connect Pin 1 to row number 20 with a jumper cable
  • Connect wires from a speaker to the GND and pin 0
  • Connect the Motion Sensor to rows 19, 20 and 21 facing away from the Micro:Bit