mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
distance shield example
This commit is contained in:
parent
06c2b72caf
commit
94075dd3fd
11
scripts/examples/30-Distance-Shield/distance_read.py
Normal file
11
scripts/examples/30-Distance-Shield/distance_read.py
Normal file
@ -0,0 +1,11 @@
|
||||
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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user