ESP32: Plot graphs through a webserver/webportal (WiFi Part 4) - Arduino

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 57

  • @greensunenergiesservice8891
    @greensunenergiesservice8891 2 роки тому +7

    You are great teacher!
    You made this issue "soft & easy" to understanding
    Thank you for your help

    • @mothunderz
      @mothunderz  2 роки тому +1

      You are welcome. Great to hear the vids worked out for you!

  • @raymondmichael4987
    @raymondmichael4987 Рік тому +3

    I have finally completed this series; This is what I call hands-on teaching, because from start to end feels like we're heading somewhere.
    Thanks buddy; Do have a video or plan to create one about ESPmDNS, because for some reasons mine does not pick the name I gave it so I keep using ipAddress in the url to access the device (AP mode)

    • @mothunderz
      @mothunderz  11 місяців тому

      Thank you very much for my feedback. Unfortunately I am completely swamped with work at the moment (hence my late response). As such I can unfortunately not create any content at the moment. I hope I will be able to pick it up again in the mid-term. Hope you understand. Thank you

  • @epiendless1128
    @epiendless1128 2 роки тому +1

    Exactly what I wanted, thank you. I already had asynchronous webserver working, created a basic chartjs, but had no idea how to link them together.

  • @Vulcanalia-sk5sw
    @Vulcanalia-sk5sw 9 місяців тому +1

    Super Tutorial! Note that ESP32FS for now only works in Arduino IDE 1.X, in 2.x it will not show :) Thanks!

  • @gerhardvandernest435
    @gerhardvandernest435 2 роки тому +2

    Thank you for the clear explanation as you work through the code. Your videos are very much helpful. Thank you for sharing.

    • @mothunderz
      @mothunderz  2 роки тому +1

      Great to hear. Thank you for your feedback!

  • @Toni0704
    @Toni0704 2 роки тому +1

    Ok, it took 2 comments to understand that entries with an URL-link get deleted automatically 🙂 Thanks for the new video, I like the entire series. I used code-base for one of my recent projects, the Math-O-Mat (s.a. newest version of the german make magazin) and referenced your videos, 'hope it brings many new subscribers.

    • @mothunderz
      @mothunderz  2 роки тому +1

      Thank you very much for the reference in the Math-O-Mat magazine! Well appreciated :-)

  • @marcosgiovanni9682
    @marcosgiovanni9682 2 роки тому +1

    very good the project is to be congratulated, it makes a websocket project showing data from digital inputs, and also see the status of the button

    • @mothunderz
      @mothunderz  2 роки тому +1

      Thank you very much for your feedback, well appreciated!

  • @amancandream
    @amancandream Рік тому +1

    Brilliant! And thanks for the homework!

  • @michelroyer5804
    @michelroyer5804 Рік тому

    Hi Mo, thank you for all your videos, it helps a lot. I would like to ask you for another video to complete this one, I would love to have 2 more pages on this example, one for a password page and one for parameters pages where the password and the numbers of sensors or adjust the sensors accuracy. I will not use this for sensors so, I'm just interested in password and multiple pages webserver but I think this can be a really nice new video to complete this amazing series. Thank you for sharing your uncredible knowledge.😊

    • @mothunderz
      @mothunderz  11 місяців тому +1

      Dear Michel, thank you for your feedback and suggestion. Yes, it is a great suggestion and would be a good new video. However, unfortunately I am completely swamped with work at the moment and dont get to record any content. I hope this changes in the mid-term so that I can pick this up again. I hope you understand. Thank you!

    • @michelroyer5804
      @michelroyer5804 11 місяців тому

      ​@@mothunderz thank you for this nice answer. We all understand your situation and, if we all hope to get some new content in your channel but, we now understand that we will need to be patient. Take good care of you. We are all waiting for you. 😊

  • @thierrybranca7221
    @thierrybranca7221 Рік тому +1

    Outstanding! XXL Thanks!

  • @ragohy
    @ragohy Рік тому

    Again, very good explanation!!! 😀👍

    • @mothunderz
      @mothunderz  Рік тому

      You are welcome. By the way, here another video on the topic I recently uploaded:
      ua-cam.com/video/DEFPSfLRObk/v-deo.html

  • @colinclews6473
    @colinclews6473 2 роки тому +1

    I enjoyed this series and plan to use it in my current project. My question is when is the Java side of the socket executed relative to the arduino. Is it immediate like an interrupt, or only when it loops through the WStype case switch. My code uses WHILE loop delays with interrupts to process user input, and I would need the socket response to get into the appropriate ISR. Thanks.

    • @mothunderz
      @mothunderz  2 роки тому

      Hi Colin,
      We have setup the code such that "processCommand" is run in the Javascript every time a message is received from the Arduino. This part of the code is where we set this up:
      Socket.onmessage = function(event) {
      processCommand(event);
      };
      So, whenever the Arduino sends something through the websocket, the processCommand function is run like an interrupt.
      Cheers,
      Sander

  • @scienceofcambridge
    @scienceofcambridge 2 роки тому +3

    Really good tutorials that go at just the right pace. Do you have any ideas for a data-logger type sketch/web-page? (i.e. the arduino logs data that can be uploaded and dynamically monitored in real time - could that be a large initial JSON upload of the logged data?)
    Thanks again - Simon.

    • @mothunderz
      @mothunderz  2 роки тому

      Hi Simon, I have not looked into sending large amounts of data, but intuitively I would not do this through Websockets. Instead I would write the data in a log file on the SPIFFS of the Arduino and whenever you need the data send it as a file. This can be done with the same webserver code. I briefly googled and think you can use this:
      techtutorialsx.com/2019/03/29/esp32-arduino-serving-file-as-attachment/
      (disclaimer: did not try myself yet)
      All the best with you project!
      Sander

  • @ERNesto9688
    @ERNesto9688 9 місяців тому +1

    Hey, thanks for the tutorial. I ran into a problem with SPIFFS. The first upload worked fine without any problems, but now i cannot upload any modified version of the jasonscript.js or add a new file. Uploading new sketches works fine, it is just the SPIFFS part with the js.
    Edit: Renaming the .js file worked fine. I do not know why, maybe someone has an explanation, as renaming was not necessary for me with the .html.

  • @johanjeques
    @johanjeques Рік тому

    Great tutorial just like I wanted, now I have seen all of your series about websocket. Thank you.
    Do you have any idea how to create websocket into hosting server with code you have explained? or could you make tutorial video about it?

    • @mothunderz
      @mothunderz  Рік тому

      Hi Johan, I have not looked into that. In fact, I am not sure I understand what exactly you are looking for. In general I only use the Webinterface of the ESP behind firewalls or on private networks. I am not sure how hacker-proof such a platform really is.

  • @pedrinhodopiru1171
    @pedrinhodopiru1171 Рік тому +1

    bro, i didnt understood the ipadress stuff. do I need to create a adress ?

    • @mothunderz
      @mothunderz  Рік тому

      Pls see this video for additional explanations on the IP stuff: ua-cam.com/video/PGt_5xQo2_0/v-deo.html

  • @noweare1
    @noweare1 Рік тому

    Quite excellent series. Lots of stuff to learn about. One question, If you are plotting a large amount of data would it make sense for the the javascript to do the data shifting and the esp32 send a data point each second ? I don't know if that is asking a lot of the browser or not.

    • @mothunderz
      @mothunderz  Рік тому

      Yes, it does make sense to reduce the amount of data that is sent over the BLE channel, but only go this way if your dataset is really large as you will be adding complexity to your Javascript. In my example it did not really matter as these are just a handful of data points. As such I have not looked yet into how Javascript could do the data shifting required to add a new data point.

  • @phamvu5066
    @phamvu5066 2 роки тому

    Thank you for sharing. If can we do the same thing with Sim800A ? in case we do not have wifi signal. Can you make new vedio for using Sim800A ? Thanks in advance.

    • @mothunderz
      @mothunderz  2 роки тому

      Unfortunately I do not have a Sim800A to investigate how this works. Good luck with your project!

  • @MrAnd361
    @MrAnd361 Рік тому

    Hello. I correctly understood that your code is able to work without an Internet connection? Thank you

    • @mothunderz
      @mothunderz  Рік тому +1

      Yes, that is correct. Good luck with your project!

  • @paulwilkie5350
    @paulwilkie5350 Рік тому

    Mothunderz where can I download the final Arduino sketch passing DHT22 data via an access point to a client?

    • @mothunderz
      @mothunderz  Рік тому

      For the video see:
      ua-cam.com/video/DEFPSfLRObk/v-deo.html
      For the code:
      github.com/mo-thunderz/ESP32WifiTempSensor

  • @harith3518
    @harith3518 Рік тому

    Hi really great video.
    do you think it is possible to start / stop a loop with 2 html button ?
    I am trying to do it but I can only start it and when it started I can't stop it.
    I use an ESP32

    • @mothunderz
      @mothunderz  Рік тому

      There are many ways to implement this. A very straightforward method would be to introduce a bool in the INO file which you could call something like "runCode". You initialize the parameter as "runCode = true". Then in the main loop you add an if statement before the code where the graph is updated:
      if(runCode) {
      if ((unsigned long)(now - previousMillis) > interval) {
      }
      }
      Then you just define two buttons in HTML and switch runCode to false/true dependent on which button is pressed.
      Good luck with your code!

  • @averycox1429
    @averycox1429 2 роки тому

    I'm trying to use a esp8266 node mcu to do this exact thing and I've tried chopping up so many other codes to get it to work. I'm lost. The closest thing I can come up with is a web page that refreshes every half a second.

    • @mothunderz
      @mothunderz  2 роки тому +1

      I dont have an ESP8266 myself, so have not coded for that platform yet. However, pls see the site here where they do something similar for the ESP8266. It should be straightforward to combine that code with mine:
      randomnerdtutorials.com/esp8266-nodemcu-async-web-server-espasyncwebserver-library/
      Good luck with your project!

  • @epiendless1128
    @epiendless1128 2 роки тому

    Just want to note that at time of writing, "ESP32 Sketch Data Upload" apparently only works with the original Ardiuno IDE, not the version 2 IDE.
    Unless someone knows a way to make it work?

    • @mothunderz
      @mothunderz  2 роки тому

      At the time of writing there is no support for upload sketch on version 2 IDE. You have to either revert to 1.8 or use another IDE (like visual Studio). Pls see this link for more info:
      forum.arduino.cc/t/ide-2-0-and-esp32-sketch-data-upload/904160/4

    • @frankiorio7143
      @frankiorio7143 2 роки тому

      @@mothunderz So I went to the trouble of downgrading to the 1.8.x IDE and now the issue is that I have an ESP32-S3 (Heltec WiFi 32 v3 dev board). The current SPIFF tool does not support S3. Is there another file upload tool/library I can use? LittleFS, etc.....

  • @rudovanaswegen6441
    @rudovanaswegen6441 Рік тому

    Hi. Im currently working on a project that I believe is not very difficult to complete for someone who is familiar with microcontroller coding like you. I would like to make contact privately if that is possible.

    • @mothunderz
      @mothunderz  Рік тому

      Feel free to reach out to me on email. This is my channel name and then gmail.com.

  • @bektinurwanto
    @bektinurwanto 5 місяців тому

    still Waiting you makes can save pdf to reporting 😊

  • @rooy598
    @rooy598 Рік тому

    I need to send the data with 1ms delay and didn't work

    • @mothunderz
      @mothunderz  Рік тому +1

      Sorry to hear you could not make the 1ms delay work. There are actually many ways to implement this. I would like to recommend the use of millis() as a time reference in the Arduino. Please do not use "delay()". With delay you basically hold up all processes on the Arduino and that cannot work. Please see this page as reference:
      www.norwegiancreations.com/2017/09/arduino-tutorial-using-millis-instead-of-delay/

    • @rooy598
      @rooy598 Рік тому

      @@mothunderz I want to contact you privately if possible

    • @mothunderz
      @mothunderz  Рік тому

      I have a gmail account that is the same as the name of my channel. Feel free to contact me there.

  • @alonsodamian7597
    @alonsodamian7597 2 роки тому

    promosm