Connecting PIR sensors to a microcontroller . The PIR acts as a digital output, it can be high voltage or low voltage, so all you need to do is listen for the pin to flip high (detected) or low (not detected) by listening on a digital input on your Arduino.Its likely that you'll want reriggering, so be sure to put the jumper in the H position! Power the PIR with 5V and connect ground to ground. Then connect the output to a digital pin. In this example we'll use pin 2.The code is very simple, and is basically just keeps track of whether the input to pin 2 is high or low. It also tracks the state of the pin, so that it prints out a message when motion has started and stopped.
-
Notifications
You must be signed in to change notification settings - Fork 0
Connecting PIR sensors to a microcontroller . The PIR acts as a digital output, it can be high voltage or low voltage, so all you need to do is listen for the pin to flip high (detected) or low (not detected) by listening on a digital input on your Arduino.Its likely that you'll want reriggering, so be sure to put the jumper in the H position! P…
AjayChouhanSingh/Iot-Active-Motion-Sensor-
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Connecting PIR sensors to a microcontroller . The PIR acts as a digital output, it can be high voltage or low voltage, so all you need to do is listen for the pin to flip high (detected) or low (not detected) by listening on a digital input on your Arduino.Its likely that you'll want reriggering, so be sure to put the jumper in the H position! P…
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published