ESP32 WebSocket Server

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ค. 2024
  • The ESP32 controller is programmed as a webSocket server to establish real-time communication with a client browser.
    Link to code:
    akuzechie.blogspot.com/2020/1...
    Link to Ulas Dikme TH-cam channel:
    / @ulasdikme7307
    Link to libraries:
    www.arduinolibraries.info/lib...
    www.arduino.cc/reference/en/l...
    Contents:
    0:00 Introduction
    0:35 HTTP & AJAX Client-Server Models
    1:38 WebSockets Specs
    2:09 ESP32 WebSocket Client/Server Model
    3:00 Block Diagram of Implemented System
    3:24 Demonstration
    3:45 C++ Sketch
    7:22 HTML, CSS & JavaScript Codes
    8:37 C++ Sketch (continued)
    9:33 JavaScript Code (continued)
    10:08 Conclusion

ความคิดเห็น • 61

  • @wmoeller1000
    @wmoeller1000 2 ปีที่แล้ว +1

    Thank you for sharing your technical videos! I have just started with the ESP32 device and need a far amount of guidance on using a web interface. The style of cleanly documenting your code and the well presented videos are superb! I look forward to the learning!

    • @AnasKuzechie
      @AnasKuzechie  2 ปีที่แล้ว

      Thanks for your feedback

  • @aliens1192
    @aliens1192 3 ปีที่แล้ว +1

    It was a really nice video! Hope to see more from you! Thanks! :)

    • @AnasKuzechie
      @AnasKuzechie  3 ปีที่แล้ว

      Thanks for your feedback

  • @SerialWombat
    @SerialWombat 10 หลายเดือนก่อน +4

    Thanks so much for this sequence of videos. I started out looking for Ajax, but then came on your series and started watching them and ended up doing a websockets implementation on ESP8266 instead. You do a great job of stripping the lesson down to fundamentals for the technology under discussion. Your quick demo of debugging html and javascript together in VSCode was worth the watching all by itself.

    • @AnasKuzechie
      @AnasKuzechie  10 หลายเดือนก่อน

      Thanks for your feedback

  • @user-mb7vh5go2c
    @user-mb7vh5go2c 6 หลายเดือนก่อน +1

    I've got to say this might be the single most helpful video I've seen on this. Thank you for your help, sir!

  • @pauloisrael9425
    @pauloisrael9425 2 ปีที่แล้ว +2

    Many thanks, it is very useful for me.

  • @reginaputz9326
    @reginaputz9326 ปีที่แล้ว +2

    Very well explained! Thank you very much!

  • @mibrahim4245
    @mibrahim4245 ปีที่แล้ว +1

    EXTREMELY HELPFUL!! THANK YOU !

    • @AnasKuzechie
      @AnasKuzechie  ปีที่แล้ว +1

      Thanks for your feedback

  • @JabastinS
    @JabastinS 2 ปีที่แล้ว

    Great, the way you have explained.

    • @AnasKuzechie
      @AnasKuzechie  2 ปีที่แล้ว

      Thanks for your feedback

  • @JJNaranjo
    @JJNaranjo 2 ปีที่แล้ว +1

    Muchas gracias por este video. Hice el ejercicio completo, con los archivos existentes en los enlaces y todo me funcionó a la perfección. Thanks a lot.

    • @AnasKuzechie
      @AnasKuzechie  2 ปีที่แล้ว +1

      Gracias por sus comentarios

  • @centrodoreforco-aulasderef7743
    @centrodoreforco-aulasderef7743 2 ปีที่แล้ว

    AMAZING EXPLANATION!

  • @thomasengelhardt7940
    @thomasengelhardt7940 3 ปีที่แล้ว +3

    Very helpful video, thank you very much. Also very well presented.
    When I tried to compile, I got an error message that within WebSocketsClient.cpp:234:30, the class WiFiClientSecure has no member named 'setInsecure'. It turned out that the WebSockets 2.3.5 library required a newer esp32 core than I was using. It was compiling fine with esp32 core 1.0.6 (I used 1.0.4 before).

  • @joeyeargain9825
    @joeyeargain9825 9 หลายเดือนก่อน

    This works great, can you show us how to edit this to use a static wi-fi IP?

  • @luisarzuaga1269
    @luisarzuaga1269 4 วันที่ผ่านมา

    Tu eres una maquina

  • @davidmaillot2253
    @davidmaillot2253 ปีที่แล้ว

    Woooo. Very good video. Thx.

  • @PhG1961
    @PhG1961 2 ปีที่แล้ว

    Awesome !

  • @mohammedtaiyab9877
    @mohammedtaiyab9877 3 ปีที่แล้ว +1

    Great explination. can we use this same for Acess point function

  • @kazialvi101
    @kazialvi101 ปีที่แล้ว

    Very Helpful video

  • @rubialugattimoreira1978
    @rubialugattimoreira1978 2 ปีที่แล้ว

    The best explanation ever

    • @AnasKuzechie
      @AnasKuzechie  2 ปีที่แล้ว

      Thank you

    • @rubialugattimoreira1978
      @rubialugattimoreira1978 2 ปีที่แล้ว

      @@AnasKuzechie excellent job! You an inspiration for makers. Would it be possible for you to do facial recognition code analysis on esp32-cam?

    • @AnasKuzechie
      @AnasKuzechie  2 ปีที่แล้ว

      @@rubialugattimoreira1978 Thanks again for your kind comment. Well that's a big project, but hopefully find the time and material to implement it.

  • @tutorialoke3562
    @tutorialoke3562 ปีที่แล้ว

    tools used only, esp32 and led?
    do you have a picture schematic diagram? this project

  • @TheTomcys
    @TheTomcys 2 หลายเดือนก่อน

    Hello, Can you provide an example of how to make that when one client clicks a button to turn on the LED status is sent to all connected clients

  • @bassjunias439
    @bassjunias439 ปีที่แล้ว +1

    Thank you for this tutorial.
    I have a question what's your opinion is the best way to take information from server , it to use Ajax or WebSocket librairy?

    • @AnasKuzechie
      @AnasKuzechie  ปีที่แล้ว

      Hi. If latency is not an issue, I would suggest AJAX. Thanks for your feedback.

  • @tutorialoke3562
    @tutorialoke3562 4 หลายเดือนก่อน

    Do you have a schematic drawing of the device installation diagram? , Thank you in advance

  • @nomanashfaq9363
    @nomanashfaq9363 3 ปีที่แล้ว

    sr i have to read readings from mpu9250 what alternations i have to made ?

  • @nomanashfaq9363
    @nomanashfaq9363 3 ปีที่แล้ว

    i tried this code it only work when usb cable is connected when i remove it the web server do not work

  • @franklinnevesfilho
    @franklinnevesfilho 3 ปีที่แล้ว

    I love the video, I'm having a bit of trouble getting the libraries used. can you share the link?

    • @AnasKuzechie
      @AnasKuzechie  3 ปีที่แล้ว

      Thanks for your feedback. Links to libraries in the description.

  • @josecrisostomofuentes1691
    @josecrisostomofuentes1691 ปีที่แล้ว

    Hello, really great video.
    I implemented your code and got a working a real time graph on my webpage. When I tried to expose my local network using Ngrok I found that I could only expose the webpage (on port 80), but the data to be plotted was not being received due to the fact that the whole websocket server is set on port 81. Is there a way get my webpage and the websocket protocol joined into a single port (80)? Or a way to expose both ports 80 & 81 to be able to receive the incoming data?
    Thanks a lot, your videos have taught me a lot.

    • @mibrahim4245
      @mibrahim4245 ปีที่แล้ว

      make sure that ngrok is running with the correct arguments; for example ngrok http 81 ..
      and more importantly, make sure that the firewall is not blocking traffic on port 81

  • @vitalyvistovsky8661
    @vitalyvistovsky8661 ปีที่แล้ว

    How to connect from command line using websocat?

  • @joeninocainday6568
    @joeninocainday6568 ปีที่แล้ว

    I've been looking for a way to work with both websocket and the webserver... turns out I juz need to switch the ports :'

  • @RayneeshHaribhajan
    @RayneeshHaribhajan ปีที่แล้ว

    Ty

  • @jaffarsadiqali1633
    @jaffarsadiqali1633 4 หลายเดือนก่อน

    Awesome explanation line by line make any beginner enthusiastic to subscribe to learn more

  • @sg8nj
    @sg8nj ปีที่แล้ว

    Great sir. Can we use this esp32 ip an outside network

    • @AnasKuzechie
      @AnasKuzechie  ปีที่แล้ว

      Thanks for your feedback. No, the code is for local IP.

  • @feihuang7007
    @feihuang7007 ปีที่แล้ว

    GOOD

  • @drakkorvladimir4012
    @drakkorvladimir4012 2 ปีที่แล้ว

    I want to do this over the internet but I am having trouble with a certificate....CA.

  • @marcosgiovanni9682
    @marcosgiovanni9682 2 ปีที่แล้ว

    Anas how do I adapt this code to the ethernet shield of arduino?

    • @AnasKuzechie
      @AnasKuzechie  2 ปีที่แล้ว +1

      Hi Marcos. I haven't applied websocket on the Arduino yet, I need to do some research first. However, I did manage to implement AJAX using the ethernet shield. You can watch my video: th-cam.com/video/PeK2gAdqjas/w-d-xo.html

  • @alexrossouw7702
    @alexrossouw7702 2 ปีที่แล้ว

    Zoom further into code please. I have a tiny screen.

  • @nomanashfaq9363
    @nomanashfaq9363 3 ปีที่แล้ว

    kindly guide me

  • @SciHeartJourney
    @SciHeartJourney ปีที่แล้ว

    I'm so sick of seeing these examples that ALL use "WebServer.h" and "WiFi.h". We're wasting our time with these examples. Those libraries DO NOT EXIST anywhere!
    So frustrating. 😖
    Nothing would make me happier than to be proven wrong with a simple link to them.

    • @AnasKuzechie
      @AnasKuzechie  ปีที่แล้ว

      Thanks for your feedback. I normally write my own libraries. May be I’ll make one in the near future.