
Parameters
•
connName
is the connector's name.this module can be pluged into both analog
connector and digital connector.
PIR event
配置指定的數字輸入引腳,然後每當上升沿引腳指示
PIR
檢測到移動時,執行相
關的代碼塊。
Configure the specified pin for digital input, and then execute the associated code
block whenever the pin in rising edge which means the PIR has detected movement.
function onPIREvent(connName: ConnName, body: () => void): void;
Parameters
•
connName
is the connector's name.this module can be pluged into both analog
connector and digital connector.
Example
Detecting the movement
當
PIR
檢測到移動的物體時,屏幕將顯示一個笑臉,當沒有移動的東西在它的範
圍內時,屏幕將不會顯示。
When the PIR detected the moving objects,the screen will show a smile face.when
there are no moving things in it range the screen will show nothing.