ESP8266 Web Server HTML Webpages Using Arduino IDE (Mac OSX and Windows)

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024

Комментарии • 47

  • @ramuch7539
    @ramuch7539 3 года назад

    it is not clearly appearing your text in video even downloaded and play full screen video.required much teaching capacity I am sorry say like this.

  • @TheAlibigdeli
    @TheAlibigdeli 6 лет назад +3

    thats actually a simple and good one but can ya teach a web server which can read html from sd card so we can interact with a real server with logs and stuffs
    this can be a real good one

    • @datasith
      @datasith  6 лет назад

      Great suggestion, thanks! In a couple of videos I'll show how to use a built-in filesystem to store webpages. From that point it's straight forward to do the same on an SD card. Nonetheless, I'll add this to the queue and make a video to actually show it!

    • @TheAlibigdeli
      @TheAlibigdeli 6 лет назад

      thanks, i am writing a packet forwarder with nodemcu and LoRa-Ra01 locally and till now i have accomplished my goal but the problem is using both sdcard and lora is a pain atm cause i need to store logs daily and sync with a web server online.

    • @datasith
      @datasith  6 лет назад

      Nice! Sounds like a fun project. My plan is to start doing project demos in future videos, so I'll add something similar to the idea list, and see if I can contribute something useful :)

  • @pierrepoirier3178
    @pierrepoirier3178 6 лет назад +2

    really nice video, everything is well explained, just I can't find the code... the github link redirects me to 404 error. continue making those videos ;D

    • @datasith
      @datasith  6 лет назад +1

      Awesome, glad you liked it! Sorry about that, I've now synced the repo so you're good to go! Thanks for letting me know.

  • @LuisPa247
    @LuisPa247 4 года назад +1

    Beautiful tutorial, i have 0 knowledge on html and webpages and now i see the light at the end of the tunnel.

  • @fvgoya
    @fvgoya 5 лет назад +1

    Is there a way to, instead write the html in the code, load a html file with all html tags that I need ?

    • @datasith
      @datasith  5 лет назад

      Yes, indeed! I have two videos covering how to do it:
      ruclips.net/video/pfJROpQg-Is/видео.html
      ruclips.net/video/QLGwI5tC9yk/видео.html
      Thanks for watching, hopefully the content is useful.

  • @GodzillazzZ
    @GodzillazzZ 5 лет назад +1

    thank you from Thailand, great vid as always

    • @datasith
      @datasith  5 лет назад

      Thailand? Awesome! Thanks from Argentina and USA for watching my vids!

  • @jeandeux5012
    @jeandeux5012 3 года назад

    Thank you so much for sharing your knowledge with us! I've used your tutorials so many times for my projects , really helped me learn and understand what the ESP8266 can do :D, cheers mate

  • @bitcollector6285
    @bitcollector6285 2 года назад

    Your videos are a true treasure!
    Thank you very much for sharing your knowledge with the community!

  • @samsulbahridapurwebsite
    @samsulbahridapurwebsite 3 года назад

    how to make multipage webserver with websocket?

  • @sucharithaanumula1849
    @sucharithaanumula1849 2 года назад

    Thanks for the information !!!

  • @tomaszmarasz6464
    @tomaszmarasz6464 6 лет назад +1

    More!!! :)

  • @neilvermeulen5283
    @neilvermeulen5283 4 года назад

    Hi Cisco.
    Let me tell you how this tutorial makes my life easier.
    I use virtually this exact code, except that I output to another pin and keep the output for 0.5 seconds. On this pin is not connected to an LED, it is instead connected to a small 3V relay. I put this relay in an isolated case inside a computer's case and put the switch of the relay in parallel with the power button of the computer. Now I can switch ON a computer over the internet. Switching a PC off is no problem but switching it on was always an issue. Not any more. Thank you. I know I'll be very popular in the office with this.

    • @datasith
      @datasith  4 года назад

      Ha! That's awesome. As you can tell, I aim to get people curious and started with these devices. So, it makes me incredibly happy when someone takes it to the 'next level' and makes something usable in the real-world. Thanks so much for letting me know; enjoy your increased popularity to the fullest extent! :)

  • @DWR6
    @DWR6 5 лет назад

    I have really learned a lot from just the few videos I have seen thus far. Great job and THANK YOU!

    • @datasith
      @datasith  5 лет назад

      Nah, Dan. Thank *you* for giving my vids a try. I'm glad you found the content useful!

  • @mehranwaheed3841
    @mehranwaheed3841 4 года назад

    hey how to fix the local IP address it get changed every time i want to fix the IP Address

    • @datasith
      @datasith  4 года назад

      you need to configure your router to always issue the same ip to the esp8266. you can also set a "static ip" to the esp8266, but it might create problems with other devices in your network, so i recommend to configure your router's dhcp settings.

  • @rand6626
    @rand6626 6 лет назад +1

    Good job!

    • @datasith
      @datasith  6 лет назад

      Thanks for the kind comment!

  • @jedandecko5585
    @jedandecko5585 6 лет назад

    Welcome back, good ones, keep them simple and short.

    • @datasith
      @datasith  6 лет назад

      Thank you, I'm glad to be back! I'm happy to hear the format of the videos is working :)

  • @jose-azevedo
    @jose-azevedo 4 года назад

    Your videos are really well explained, thank you for that. There is just one think I don't get. Why does the function "toogleLED" is executed when you press the button? I thought that it would be needed to specify what the button would do but it seems to just refresh the page.

    • @datasith
      @datasith  4 года назад +1

      Thanks for the kind words, José. I'm glad you found the videos useful. The button sends a request to a URL of the web server running on the ESP8266. Once the web server receives that request, it both returns the new webpage (which you see as a refresh in the browser) as well as run the function toggleLED(). HTH!

    • @jose-azevedo
      @jose-azevedo 4 года назад

      @@datasith Now I get it, thanks man!

  • @TopEndTutorial
    @TopEndTutorial 6 лет назад

    Can we control this web page by internet

    • @datasith
      @datasith  6 лет назад

      Yup, you can use 3rd party apps like Cayenne (ruclips.net/video/6YAnqHTm7_o/видео.html). I'll also post how to do it yourself in a few weeks. Stay tuned!

  • @avejst
    @avejst 6 лет назад

    Thanks for sharing :-)

    • @datasith
      @datasith  6 лет назад

      Thanks for watching :)

  • @marcosprata931
    @marcosprata931 5 лет назад

    Awesome!!!

  • @neilvermeulen5283
    @neilvermeulen5283 6 лет назад

    Thank you Cisco. I needed this.

    • @datasith
      @datasith  6 лет назад

      Neil Vermeulen you’re very welcome! I’m glad it was useful. Thanks for watching!

    • @neilvermeulen5283
      @neilvermeulen5283 6 лет назад

      Quick question - How am I going to get an input from an HTML text-box into the Arduino-side of things? Let meexplain. I want to build a web page with two text boxes, and one button. Textboxes should hold the values for SSID and password. Button click, should set the board up to connect to this new SSID. I've learned something else too. Once connected to an SSID, the settings are saved internally and wifi.begin(ssid,password) is not needed. I am thinking of building something commercially and would want a way to have my users set up the connction to their environment without problems. Easiest I could find was by setting the NodeMCU up to listen for incoming connections. I can then post values back to itself. I really do not want to do this though. Security risk.

    • @datasith
      @datasith  6 лет назад

      Heya Neil. There's a ready-made solution called Wi-Fi manager for that purpose. But, I was/am planning on posting a video on a simpler DIY version next month.
      Sending the SSID and password data can be done in a few ways, the most common: using an HTML form's action (POST method) or with JavaScript (AJAX method). For receiving the data on the ESP8266 check out the examples webserver_rx_data and webserver_rx_json on github.com/acrobotic/Ai_Tips_ESP8266.
      Storing those values on the ESP8266 can be done by saving them to Flash memory (so they're available even at reboot).
      Your code should:
      1) Read values from Flash memory
      2) Try to connect to the stored SSID
      3) Time out if unable to connect
      4) (Optional) Go to AP mode to wait for SSID/password values
      HTH. Also, if your timeline is not urgent, I'll be making this video in August!
      Thanks for your continued interest in my channel :)

    • @neilvermeulen5283
      @neilvermeulen5283 6 лет назад

      Thanks mate!
      I had a similar idea. I have my WiFi.begin in it's own method. I used to call this method from the Setup() method. Once I forgot to add the single line of code to my Startup() method. My code kept on working and I only noticed there was something funny going on when I changed the values of the variables and it still connected to the original AP. Upon further investigation, I saw that I never called the connect method from startup. That explained why changing the variables in the connect method did nothing. It's never called. This switched on a light for me. This means I could set up the wifi access, and never call wifi.begin ever again. Even if I reboot or completely take it off of power. It's a good thing. I investigated further. I came accross a site that says the last two value-sets (SSIS/password combinations) are somehow saved internally. What internally means, is the $1000000 question. Still, this opens new possibilities. I could now use this feature, to set up my Arduino on a client's site with no problems. I though of having a timeout on my loop method. If it did not connect in the main loop method in let's say one minute, put the NodeMCU in a server-like state where it is also an AP. I can than connect to this AP from say a cell phone, and open the default web page containing my two text boxes and button where I tell the board about the new AP. The board then connects to these values and reboots. Now the last AP used would be the settings I entered and if all is correct, it should connect without any problems. I can do all this with an HTTP POST method. That is not the problem. I just do not want to use HTTP POST. It is a bit of a security risk.

    • @neilvermeulen5283
      @neilvermeulen5283 6 лет назад

      Have a look at this.
      www.esp8266.com/viewtopic.php?f=32&t=3218