A Motion Detecting Device
by pasan prabhasara in Circuits > Microcontrollers
132 Views, 0 Favorites, 0 Comments
A Motion Detecting Device

if anything moved in front of the sensor the alarm rings.
Supplies

Microbit board, Buzzer(piezo), PIR sensor and few jumper wires.
Connect the Buzzer
![_[PIR sensor]motion detector (1).png](/proxy/?url=https://content.instructables.com/FN2/WOME/LMM1GGKE/FN2WOMELMM1GGKE.png&filename=_[PIR sensor]motion detector (1).png)
now connect the buzzers positive pin to the pin-0 in the microbit.
connect the negative pin of the buzzer to the GND.(ground).
Connect the PIR Sensor
![_[PIR sensor]motion detector.png](/proxy/?url=https://content.instructables.com/FTN/7WCR/LMM1GFMA/FTN7WCRLMM1GFMA.png&filename=_[PIR sensor]motion detector.png)
connect the signal pin of the PIR sensor to the Pin-1 in microbit board.
connect the power pin of the PIR sensor to the 3V in microbit.
connect the the Ground pin to the GND pin in microbit.
Coding

Now make the code as shown in this picture.
Start Simulation
happy microbitting.