I've tried working through Adafruit's lovely tutorial, but it appears that the component I'm working with (EKMC1603112) is not set up the same way as Adafruit's. (I had no idea there could be such variance.)
I currently have the PIR signal (
OUT on page 5 of the datasheet) wired to GPIO1 (BCM 18) on the Pi and VDD (5V) and GND wired to their respective pins.
(I can take a picture if necessary, but there is another component wired up that will make the circuit slightly confusing.)
I'm using the following code, modeled after the Adafruit tutorial, assuming red is VDD, black is GND, and yellow is signal.
import RPi.GPIO as io import time io.setmode(BCM) io.setup(18, io.IN) while True: io.input(18) time.sleep(1)
When I run this code,
RPi.GPIO.input is returning True regardless of whether or not motion is (supposedly) being detected.
What am I doing wrong?
I have it set up exactly as Adafruit does, less the component wired from BCM23 to GND.