new Switch(pins)
switch.js, line 10
Switch module.
| Name | Type | Description |
|---|---|---|
pins |
Number | The pins number. |
Methods
-
on(eventName, listener)
switch.js, line 24 -
Listen the switch's state.
Name Type Description eventNameString The name of the event. listenerfunction The callback function.