
Example
Switch control the screen show
如果開關打開,屏幕將顯示一個笑臉,否則將不顯示任何內容
If the switch is opened the screen will show a smile face , otherwise it will show
nothing.
Show the switch module's status
在這個例子中,我們使用
switch
事件來顯示交換機的狀態。
當開關打開時,
LED
屏幕將顯示一個字符串“打開”,否則
LED
屏幕將顯示“關閉”。
In this example we use the switch event to show the switch's status. When the
switch is opened, the led screen will show a string 'Open', otherwise the led screen
will show 'Close'.