Angle Unit
支持以下产品:
MicroPython 应用示例
import M5
from M5 import *
from unit import *
M5.begin()
angle_0 = Angle((8,9))
while True:
print(angle_0.get_voltage())
print(angle_0.get_value())
UiFlow2 应用示例
“””class Angle”””
构造函数
- class Angle(port)
创建一个 Angle 对象。
- 参数为:
port是该端口的引脚编号。
UIFLOW2:

Methods
- Angle.get_value()
该方法允许读取 Angle 的旋转值并返回一个整数值,范围为 0-65535。
UIFLOW2:

- Angle.get_voltage()
该方法用于读取 Angle 的电压值,返回值为浮点数。
UIFLOW2:


