This is a small infra-red distance sensor with I²C interface. It can measure distances from 4 to 127cm. The source code is available here: https://bitbucket.org/thesheep/micropython-gp2y0e03/src
Example use:
from machine import I2C, Pin
import gp2y0e03
i2c = I2C(Pin(5), Pin(4), freq=100000)
s = gp2y0e03.GP2Y0E03(i2c)
s.read()
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.