Posts

Showing posts from March, 2022

Arduino #32 用一塊ESP32來學 IOT (#32 Learn IOT with MQTT + ESP32)

Image
大家好, 今天和大家來分享, Arduino #32 用一塊ESP32來學 IOT (#32 Learn IOT with MQTT + ESP32) 這個影片很適合初學者來觀看學習. 影片內容主要是告訴大家, 只要手上有一塊 ESP32 和一台電腦, 就可以開始學習 IOT 了 ! 看過這個影片, 你會了解學習 IOT 一點都不難喔! 甚至可以延伸作法, 利用 MQTTlens 透過雲端EMQX來做遠端的控制! 參考資料: Pubsubclient library: https://github.com/knolleary/pubsubclient/blob/master/examples/mqtt_esp8266/mqtt_esp8266.ino Additional Boards Manager URL: https://arduino.esp8266.com/stable/package_esp8266com_index.json,https://dl.espressif.com/dl/package_esp32_index.json Source code: https://stonez56.blogspot.com/ 如果時間不夠的朋友, 也可以從以下的時間軸挑選想看的部份即可! 影片時間軸: 00:00 開始 00:29 什麼是 MQTT,它是如何運作的? 01:30 你的第一個IOT專案! 01:55 MQTT 程式:pubsubclient 02:40 Arduino IDE: 設定Additional Boards Manager URL 03:09 Arduino IDE 其它設定 03:48 從我的部落格中下載程式並貼在Arduino IDE 04:07 在程式中更改必要的設定 07:27 從 Chrome 瀏覽器啟動 MQTTlens 07:54 在 MQTTlens 新增 EMQX 連線 09:54 訂閱 ESP32上的兩個主題 11:19 從 MQTTlens 發布主題 12:45 本次主要內容摘要 程式碼: /* Basic ESP8266 MQTT example This sketch demonstrates the capabilities of the pubsub library