USA
Asked — Edited
Resolved Resolved by JustinRatliff!

Pir Script

I'm trying to read the status of a PIR detector using:

getDigital(D0)

but it is always showing the the port is high, whether something is in front of it or not. Do I first have to designate that the port is in input port, and if so, how do I do this? If that is not the issue, any suggestions?

Thanks for anyone willing to assist.

R1D1


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#17  

I appreciate the offer for the resistor Justin. I found two 5.6K 's. So I could put them in series and be pretty close. Think there is any harm in being 1.2K off?

#18  

I don't think there will be any harm to try it. My guess is it will work, but it is possible it could be too much resistance to allow the sensor to trip or it might not be optimal, but certainly no harm.

#19  

Well, finally got some time to play with this again. I grounded the signal wire with two 5.6k resistors in a series and that did the trick! Finally, seeing a spark of life in my project. Thanks so much for your input. All of you were helpful. Hopefully I'll be able to add to the discussion in time.