tp LED
Tibbo-PiのLEDを点灯・消灯します。
LEDは以下の場所に4つあります。
ノードの配置
functionノードを使用します。
functionノードの編集を開き、コードに以下を記述します。
LED1を点灯します。
1 2 |
msg.payload = {no: 1, v: 1}; return msg; |
実行するとLEDが点灯します。
サンプルフロー
1 |
[{"id":"1fef2f0a.be8db9","type":"tp-LED out","z":"3efecf70.7f7ef8","name":"","tpSlot":"S00","communication":"TP_LED","connectedStatus":"start","host":"","x":420,"y":440,"wires":[]},{"id":"351af0a9.7257e8","type":"function","z":"3efecf70.7f7ef8","name":"","func":"msg.payload = {no: 1, v: 1};\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":400,"wires":[["1fef2f0a.be8db9"]]},{"id":"e6132fb2.3ab998","type":"inject","z":"3efecf70.7f7ef8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":340,"wires":[["351af0a9.7257e8"]]}] |