I've been looking at the IR break beam here. and using this Python program:
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN)
#I've tried with and without pull up, i.e., pull_up_down = GPIO.PUD_UP
while True:
if(GPIO.input(17) ==1):
print(“Beam Broken”)
if(GPIO.input(17) == 0):
print(“Solid”)
#I've also looked at print(GPIO.input(17)
The results are a bit inconsistent. Namely, though '1' has showed up once. When restarting it only showed 0. When measuring the output of the 'switch' cable - it seems to be about .07 V
The Sensors are wired in the provided link (for Arduino) with direct connections for both sensor and connector to ground and 3v3. The signal cable is connected to pin 17.
Not sure how to trouble shoot at this point. Perhaps a more sensitive reading of the pin?