學習目標
- 設定 Node-RED 控制 LinkIt 7697 LED
前置準備作業
- 一台已連上網路的電腦
Step 1. 開啟 Node-RED 編輯頁面
☆ 請參考下方網址中的 【 Step 4. 開啟 Node-RED 編輯環境 】
https://oranwind.org/-aws-zai-ec2-an-zhuang-node-red/

Step 2. 建立 Node-RED 程式
❖ 2.1 將 【 Input 】 中的 【 inject 】 節點拉到 Node-RED 編輯區域


❖ 2.2 點選編輯區中的 【 inject 】 節點

❖ 2.3 點選 【 Payload 】 欄位的下拉選單為 【 String 】

❖ 2.4 在 【 Payload 】 欄位中輸入 【 1 】,再點 【 Done 】



❖ 2.5 將 【 Input 】 中的 【 inject 】 節點拉到 Node-RED 編輯區域


❖ 2.6 點選編輯區中的 【 inject 】 節點

❖ 2.7 點選 【 Payload 】 欄位的下拉選單為 【 String 】


❖ 2.8 在 【 Payload 】 欄位中輸入 【 0 】,再點 【 Done 】



❖ 2.9 將 【 Output 】 中的 【 mqtt 】 節點拉到 Node-RED 編輯區域


❖ 2.10 建立 【 mqtt 】 節點與 【 inject 】 節點間的關係,再點選 【 mqtt 】 節點

❖ 2.11 點選 【 Server 】 欄位旁的畫筆

❖ 2.12 ① 【 Server 】 欄位輸入 【 mqtt.mcs.mediatek.com 】
② 點選 【 Update 】按鈕

❖ 2.13 在 【 Topic 】欄位輸入 【 mcs/DeviceId/DeviceKey/led 】,在點選 【 Done 】
㊟ DeviceId 部份輸入 MCS DeviceId
DeviceKey 部份輸入 MCS DeviceKey


❖ 2.14 點選右上角的 【 Deploy 】 的按鈕

❖ 2.15 部署成功後的畫面

GitHub
List of blogs