AliciaCrane
Posts: 11
Joined: Sat Jul 23, 2016 1:09 am

PIR

Sun Jul 24, 2016 11:24 am

Hi, i am new to Pi and i need some help as a beginner.
I am using a RPi3 and with a PIR Sensor.

So I followed the codes in https://www.raspberrypi.org/learning/pa ... worksheet/

Code: Select all

from gpiozero import MotionSensor

pir = MotionSensor(4)
while True:
if pir.motion_detected:
print("Motion detected!")
and i have connected the same way as the picture in the link but after running, even though there is no motion, lots of
“Motion detected" is printed and it doesn't stop.

Why is that so?? Is my PIR having problem or the connection for RPi3 is different??

pcmanbob
Posts: 9611
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: PIR

Sun Jul 24, 2016 11:47 am

The link you posted is incomplete please try posting it again.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

drgeoff
Posts: 10829
Joined: Wed Jan 25, 2012 6:39 pm

Re: PIR

Sun Jul 24, 2016 12:44 pm

What PIR sensor and how connected to RPi?
Quis custodiet ipsos custodes?

AliciaCrane
Posts: 11
Joined: Sat Jul 23, 2016 1:09 am

Re: PIR

Sun Jul 24, 2016 12:49 pm

pcmanbob wrote:The link you posted is incomplete please try posting it again.
Sorry for the incomplete link.
https://www.raspberrypi.org/learning/pa ... worksheet/

AliciaCrane
Posts: 11
Joined: Sat Jul 23, 2016 1:09 am

Re: PIR

Sun Jul 24, 2016 12:51 pm

drgeoff wrote:What PIR sensor and how connected to RPi?
Im using the same PIR sensor in this link https://www.raspberrypi.org/learning/pa ... worksheet/
and i connected what is instructed.

However, my sensor does not have the retrigger setting jumper.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: PIR

Sun Jul 24, 2016 4:07 pm

There was an almost identical discussion here, from about 2 months ago: viewtopic.php?f=91&t=149724

In that case I think it was concluded that the sensor was faulty.

Return to “Beginners”