Close

SHARP GP2Y0E03 Distance Sensor

A project log for Various Micropython Libraries and Drivers

A collection of miscellaneous libraries and drivers for Micropython

dehipudeʃhipu 09/09/2016 at 13:290 Comments

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