EARTH Unit
支持以下产品:
Micropython Example:
import M5
from M5 import *
from unit import *
M5.begin()
earth_0 = Earth((36, 26))
print(earth_0.humidity())
UIFLOW2 Example:
class Earth
Constructors
- class Earth(port)
创建一个Earth对象。
- 参数是:
port
是端口的引脚号
UIFLOW2:
Methods
- EARTH.get_analog_value()
此方法允许读取EARTH采集的模拟量并返回一个整数型数值。范围为0-65535。
UIFLOW2:
- EARTH.get_digital_value()
此方法允许读取EARTH采集的数字量并返回一个整数型数值。范围为0或者1。
UIFLOW2:
- EARTH.get_voltage_mv()
此方法允许读取EARTH采集的电压值并返回一个整数型数值。范围0-3300。
UIFLOW2:
- EARTH.humidity()
此方法允许读取EARTH采集的电压值并返回一个浮点型数值。范围0.0-1.0。
UIFLOW2:
- EARTH.set_calibrate()
此方法允许设置校准EARTH传感器的最大(0-3300)和最小值(0-3300)。
UIFLOW2: