Grove - IR Distance Interrupter

Is the Grove - IR Distance Interrupter supported in the seeedstudio grove.py library? if so… does anyone have sample?



<LINK_TEXT text=“https://www.seeedstudio.com/Grove-IR-Di … -1278.html”>https://www.seeedstudio.com/Grove-IR-Distance-Interrupter-p-1278.html</LINK_TEXT>



Thanks

Hi There
</s><i> </i>import time from grove.gpio import GPIO IR_Distance = GPIO(22, GPIO.IN) while True: if IR_Distance.read(): print "found something" else: print "nothing" time.sleep(0.1) <e>

Thank you for your response. In the grove hat for pi zero the PIN 22 would be the PWM slot?

Hi There

it is not likely to be a hardware PWM , but it can use software PWM by visit <LINK_TEXT text=“https://www.raspberrypi.org/forums/view … p?t=183770”>https://www.raspberrypi.org/forums/viewtopic.php?t=183770</LINK_TEXT> :smiley: