Build a Webserver on NodeMCU ESP8266 in Station Mode

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.พ. 2022
  • Learn how to build a Webserver on NodeMCU ESP8266 in Station Mode. We can build webserver on ESP8266 in three different modes namely Station Mode (STA), Soft Access Point Mode (AP) and Station + Soft AP Mode. This lightweight webserver running on ESP8266 microcontroller serves HTTP request and response. We will program this HTTP Webserver in Arduino. In the end, we’ll control LED connected to ESP8266 from web browser as a client from desktop or mobile phone
    [SUPPORT]
    ►► Get FREE TRIAL of Altium Designer: www.altium.com/yt/binaryupdates
    ►► Need Help? To Learn Embedded Systems: courses.binaryupdates.com
    [TIMESTAMPS]
    00.00 Introduction
    00.34 Code overview
    06.06 HTTP routes
    14.38 Create webpage
    19.14 Upload Arduino code
    20.18 Test webserver
    22.06 Client-server communication
    24.02 Finally control led through webpage
    [LINKS]
    ►► Project Files: github.com/binaryupdates/Node...

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

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

    Thank you very much for the video. Learned a lot ❤️❤️

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

      Hi Aruna, Glad it was helpful!

  • @surya.r3463
    @surya.r3463 ปีที่แล้ว +1

    Thanks dude

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

    Very Good explanation,👌🙏 just one thing what is ptr ptr?

  • @surya.r3463
    @surya.r3463 ปีที่แล้ว +1

    It just works

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

    my webpage from arduino wants to send a text data to 8266wifinpdemcu. what configuration I should make in 8266 sketch to receive it. I have the webserver running. now I have to take the text from a form and paste it in input text area of the client.
    thanks

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

    Hi, D4 'is not declared', so I entered 2, (GPI02), and it works. This is all good stuff, well done..

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

      Excellent!

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

      Same, but took another route. Added before void setup() {
      INT D4 = 2;
      That resolved "error: 'D4' was not declared in this scope" compile errors.
      I wasn't seeing the wifi connection status and IP address so I increased the "delay(200)" value to "delay(10000)" and that was a long enough for everything to work as advertised. Thanks for sharing!

  • @ChandanKumar-vh7po
    @ChandanKumar-vh7po ปีที่แล้ว +2

    Thanks, bro. It cleared my so many doubts. But the problem with this setup is, each time, a new webpage is generated when client make a request. More the data, more the time for page to be uploaded. If you don't mind, would you like to make a detailed video on websocket. You are really awesome to make things understandable.

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

      Yes, definitely. I'll cover in next few videos in this NodeMCU ESP8266 series
      Good day!

    • @ChandanKumar-vh7po
      @ChandanKumar-vh7po ปีที่แล้ว

      Thanks

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

    great video

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

    hey thank you so much for the tutorial
    i really enjoy how you take your time and explain every line of code to make sure we properly understand it
    youre 100x better then the trashy diy youtubers who dont explain shit and just make people download and run the code
    but i didnt understnad what ptr ment can you tell me

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

      Hi Siddharth, I'll try to cover pointers in upcoming videos of NodeMCU ESP8266. Thanks for your words concerning video. Best wishes !!

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

      @@BINARYUPDATES okay thank youuu:D

  • @Raghul-rt6vq
    @Raghul-rt6vq 8 หลายเดือนก่อน +2

    Sir making webserver for node mcu is best or blynk iot is best

    • @BINARYUPDATES
      @BINARYUPDATES  8 หลายเดือนก่อน +1

      Hi Rahul, It depends on your project need. Please understand Blynk or local webserver running on NodeMCU ESP8266 both are good. Blynk will provide you public access from entire world and webserver will be local in the same network only. I hope this answers your question. Good luck and best wishes!

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

    Hello,
    Thanks for the Video,😀 yes it is very well explained I enjoyed it and in the first go I could get it working . 👍
    Have you any video on setting up the light HTML page.
    I am looking at adding two items one is to add a second button and next to add a link to open a page to send configuration data to the Webserver Client.
    Support and help appreciated. AyDe

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

    Hi, Thanks for the video, I tried the same code for my ESP8266 by connecting LED, but I got an error" failed to write to target RAM(result was 0107) " .Could you please guide what might be the error and how can I fix it?

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

      Hi Sree, this seems to be an issue with flash memory of ESP8266. If you're using NodeMCU then you must consider using FLASH button. You should press and hold this flash button for long time. You can always keep serial monitor open to see status. and then try and upload code arduino code for webserver. I hope this may help you. Good luck!

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

    LED blinking not working by using IP adress in this code

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

    Do you plan on making a series of Webserver using NodeMCU or ESP32.
    I want to make webpage where you type a text as input and NodeMCU will use this input to do something about it. For examples, you type in some text in webpage and display it in dot matrix or maybe use trackbars in webpage to change RGB Led's red, green, and blue values. Something like that.
    I saw other youtubers showing this type of thing. But they never explain a code. They just tell you to copy and paste their code.
    Maybe you can teach html and javascript that is can be useful for Arduino/NodeMCU.
    I already took a month to learn building a website using React. Then I realized learning React is nothing useful for building website for my NodeMCU webserver project.

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

      I am also thinking same. It would be great if he makes one more video as this one was also great.

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

    👍

  • @daniyal4757
    @daniyal4757 4 หลายเดือนก่อน +1

    Hi
    is it possible to make nodemcu to have static local ip?

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

      Yes, its possible we just have to mentioned in our nodemcu webserver code and assign fixed static IP address. I've covered this in another webserver example video lesson on my channel. I hope you'll find that video in playlist. Good luck and best wishes!

  • @MrBobWareham
    @MrBobWareham 5 หลายเดือนก่อน +1

    I would love to control 6 esp8266 with one relay on each around my home, but have not found any lesson to show me to help, perhaps you can?
    1 esp8266+relay = bedroom, 1 esp8266+ relay = lounge 1 esp8266+relay kitchen 1 esp8266+relay = workshop and so on.

    • @BINARYUPDATES
      @BINARYUPDATES  5 หลายเดือนก่อน

      Hi Bob, presently I have already made video on interfacing relay with ESP8266 NodeMCU. I think in your project you may need to make one ESP device as a web server than other 6-esp8266 devices as a client. I'll try to make such a video in future. As I been doing busy these day. I hope you understand making video takes a a lot of time and effort. But still you can make it if you follow my all videos piece by piece and put them together. Wish you good luck and best wishes!

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

    does this work on esp01 module

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

      Hi Raymond, code will surely work with ESP-01S Module. I have dedicated video of it. You'll find as a ESP-01S Firmware update video lesson on our channel. Good luck!

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

    Thanks for the video, please I need esp8266webserver library

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

      Hi Akin, if you've added ESP8266 support properly in Arduino IDE. Then "ESP8266WebServer.h" library comes by default. Also make sure board ESP-12E NodeMCU 1.0 is selected properly. This will resolve issue. Good luck and best wishes!

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

      @@BINARYUPDATES thanks

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

    bro i am not able to use my mobile hotspot to contol led , it is working on my wifi - internet connection of home but does not work on mobile hotspot .

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

      Hi Yash, it happens because there are mobile phones OS. And some of these android or iOS phone requires you to make changes in security settings. If your mobile phone OS has strict WiFi settings then it won't allow access of webserver hosted on NodeMCU ESP8266 over hotspot. I hope this may help you. Good luck and best wishes!

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

    How can I send html form input data to esp8266

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

      You may need to create HTML form and host on your webserver built on ESP8266 NodeMCU. And then client will access through browser. I hope this may help you. Good luck!

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

      @@BINARYUPDATES Thanks Bro

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

    i got the ip but cant go to my webserver?

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

      Make sure your laptop is also connected to the same internet to access webserver running on NodeMCU ESP8266. Good luck and best wishes!

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

    Could you share your web script?

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

      Hi Pandhu, the arduino code of webserver example is shared in description section. There is an github link. Good luck!

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

    i want to build a webpage with numbers showing with increment and 1 sec display can u tell how

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

      Hi It can be done easily but unfortunately due to lack of time. But I'll consider making video on hosting webpage on ESP8266 webserver in near future. I hope you understand. Thanks!

  • @AbdulSamad-hd1sr
    @AbdulSamad-hd1sr 10 หลายเดือนก่อน

    It's local hosted not internet

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

      Hi Abdul, YES webserver usually hosted on microcontroller and serve web pages in local network.

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

    FALSE ADVERTISING don't watch this video

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

    Very Good explanation,👌🙏 just one thing what is ptr ptr?