Motion Sensor

In this project, you'll learn how to connect and control a motion sensor.

The motion sensor senses the movement of an object such as a person.

Parts needed:
  • Arduino
  • Motion sensor HC-SR501
  • Wires
  • Breadboard
Motion sensor
1 Making the connections
  • Connect the Out pin on the sensor to pin 3 on the Arduino.
  • Connect Vcc to 5V.
  • Connect GND to GND.
Motion sensor
2 Create a new BareMinimum program and type in this code. Basic motion sensor code
3 Run the program and test the sensor.