openmv/scripts/examples/30-Distance-Shield/distance_read.py
2019-03-29 22:40:35 +08:00

12 lines
180 B
Python

from machine import I2C
from vl53l1x import VL53L1X
import time
i2c = I2C(2)
distance = VL53L1X(i2c)
while True:
print("range: mm ", distance.read())
time.sleep(50)