这是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 🙂