這是ESP32 WebSocket伺服器視頻的延續:https://www.youtube.com/watch?v=ZbX-l1Dl4N4。讓我們再上一個台階!我們首先使用Arduino在ESP32上託管Web伺服器和WebSocket伺服器。接下來,我們使用SPIFFS上傳一個單獨編寫的簡單index.html頁面。該頁面將打開一個與ESP32的WebSocket連接,在這裡我們可以使用頁面的按鈕來切換LED(相對較快)。
請注意,此處我們將ESP32用作接入點(AP)以簡化過程。如果希望將Web伺服器放置在本地網路上,則可以取消訪問點。
WebSocket在客戶端和伺服器之間提供了持久的連接,因此任何一方都可以隨時發送數據。它們在聯網視頻遊戲等方面非常有用,但如果我們需要通過網路快速控制硬體,它們也可以應用於IoT設備。
視頻中的Arduino和HTML代碼可以在以下位置找到:http://shawnhymel.com/1882/how-to-create-a-web-server-with-websockets-using-an-esp32-in-arduino/。
Good work Shawn! Done as you had explained and it works perfectly!
why my project is "error mounting SPIFFS"???
I want to ask, I think this is a stupid question.
can this be accessed from anywhere? or only the local server
Great video on WebSockets. Loved it !
please can you do a tutorial that can teach us this from beginingn to end
Can we run videos on Arduino by using ESP32 module without or with Wifi?
Hi, I would like to ask the way around. How about create a node websocket server and client, and esp32 as an endpoint just to send data to server. Is that possible?
wow it looks like easy i will try it thanks for your time ! 🙂
You have great content!!! May I ask Why you take so long time to upload?? Keep this channel live. This is a really good channel!!
Wow nice timing! Exactly what I need for my next project. ❤️
Great video, thanks! Apart from not requiring a message broker, what are the advantages of using websockets instead of mqtt messages?
Well done.
„A few months ago「 – man, feels more like ages. But as always, great work, clean code. Minor improvement could be made trough the use of a captive portal, which opens directly after connecting to the access point. thumbs up
After a looooooong time 🙂