Hi All
I’ve just hooked up my PIR sensor to my Pi3
I ran a variant of this, and it was constantly detecting movement even when I was covering it up, so nothing should have been detected.
Is there an issue with my sensor? Or is that standard? Or can I turn down the sensitivity in some way?
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(3,GPIO.OUT) #Define pin 3 as an output pin
while True:
GPIO.output(3,1) #Outputs digital HIGH signal (5V) on pin 3
time.sleep(1) #Time delay of 1 second
GPIO.output(3,0) #Outputs digital LOW signal (0V) on pin 3
time.sleep(1) #Time delay of 1 second
Edit from admin: Please use Markdown on code snippets!
