模板:DelveBit mPython
来自Labplus盛思维基百科
- GitHub:bluebit for mPython library
- bluebit for mPython library API: https://mpython-lib.readthedocs.io/zh/master/bluebit/index.html
from mpython import * # 导入mpython
import bluebit # 导入bluebit 模块
meter=bluebit.DelveBit(0x60) # 实例模块,根据实际I2C地址修改
while True:
value = meter.common_measure() # 测量
print("measure: %f" %value)
sleep_ms(200)