分页: 1 / 1

US-100 传感器的 microbit 驱动

发表于 : 2019年 11月 25日 12:01
shaoziyang
这是另外一种超声波传感器 US-100 的驱动,可以同时读取温度和距离。

使用方法

Code: Select all

from us100 import US100
from microbit import sleep


sonar=US100()
while True:
print('%.1f' % (sonar.distance_mm()/10))
print('%i' % sonar.temperature)
sleep(1000)
https://github.com/fizban99/microbit_us100