
Module
Connect Type Available Connectors
Switch Module Digital IO
D12, D13, D14, D15
TODO
[HW Team] Need hardware engineers to add this module's specific parameters.
Block API
Check the switch's status
Check whether the switch is openeded or not.
function switchIsOpened(connName: ConnName): boolean;
Parameters
•
connName
is the connector's name.this module can be pluged into both analog
connector and digital connector.
Switch event
配置指定的數字輸入引腳,然後在開關打開或關閉時執行相關的代碼塊。
Configure the specified pin for digital input, and then execute the associated code
block whenever the switch is opened or closed.
function onSwitchEvent(connName: ConnName, event: SwitchEvent, body: ()
=> void): void;
Parameters
•
connName
is the analog connector's name.this module can be pluged into both
analog connector and digital connector.
•
event
represent two status of switch,open and close.