❌ ❌ ❌ ❌ ❌ ❌ ✅

NXT 触摸传感器

../_images/nxtdevice-touch.png
class TouchSensor(port)

LEGO® MINDSTORMS® NXT 触摸传感器。

参数:

port (Port) – 传感器所连接的端口。

pressed() → bool

检查传感器是否被按下。

返回:

True 表示传感器被按下,False 表示未被按下。