015 - ESP32 MicroPython: Web Server | Station Mode | Sockets

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ส.ค. 2024
  • In this video we will learn how to create a web server hosted in ESP32 using MicroPython language for controlling the state of a gpio pin.
    This knowledge can be use for controlling a relay which is popular in home automation projects. For the sake of simplicity, I will only use LED for the demonstration.
    For more details, visit my blog post at:
    techtotinker.c...
    Please do COMMENT, LIKE, SHARE, and SUBSCRIBE.
    Thank you,
    George Bantique
    #TechToTinker
    #ESP32MicroPython
    #MicroPython

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

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

    Excellent video! Thank you for sharing.

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

    Thanks for the effort. Video is Easy to understand.

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

      @S S Goh, glad you liked it. Cheers.

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

    Thanks for the tutorial! Much appreciated!

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

    Thanks for this very detailled and usefull explanation ! May I use it in class with my students ?

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

      Of course, cheers. Thanks

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

    Thank you very much for sharing. Your videos are very good and easy to follow.

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

      Glad you like them! Thanks.

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

    Thanks a lot! It's working perfectly. Congrats man!!

  • @AXE-gb4cc
    @AXE-gb4cc 3 ปีที่แล้ว +2

    please add more videos on ESP32 and using it as REST API post method

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

      @DJ noted on that, thank you for your suggestion.

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

    Parabéns pelo vídeo!!! Abraços...

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

    Awesome!

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

    Could you also show how to connect and apply a real time clock (RTC)?

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

      Noted on that suggestion. Thanks

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

    Hi
    I have mfrc522
    I import mfrc522 in python
    But I dont now how it work
    How can I find documentation?

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

    Hi dear George. How we can create more buttons and control more led???

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

      i think u can change the html code and can add more buttons and add more functions too

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

    blog post doesn't work

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

    Great video thank you very much George ! Tell me please can i apply this to esp8266? Thanks.

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

      Hi @Vladimir Laiu definitely possible with a little adjustment on pin assignments. Thank you.

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

    In 6:18, sta.isconnected() then output:False but it is should be True.
    For other question, in 6:32 sta.ifconfig() my output: ("0,0,0,0")
    Why those problem happening like as I said? anyone help to me for solving my issues?

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

    Great

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

      Thank you @Kevin Thomas.

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

    Nice

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

      @parth patel, glad that you liked it. Thanks

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

    I follow steps on video,, 2:27 - sta.. active(True) - there isn't a respond on my shell - how to solve it? *I use esp8266

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

      Update - I try to another laptop - it worked, thank Youuu
      Can you tell me what happened to my 1st laptop? "Coriously still

  • @ImnotChuck.
    @ImnotChuck. 3 ปีที่แล้ว

    I have tried to follow the instructions exactly, but I am having a problem. After running the code, and accessing the created web page, I can turn the LED on, but the web page does not recognize that the led is on, so I cannot turn it off. In addition, I get the following error message:
    Traceback (most recent call last):
    File "", line 96, in
    File "", line 71, in web_page
    NameError: local variable referenced before assignment
    Can you suggest how I can resolve this problem? Thank you.

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

      @I'm not Chuck, the error says you have a local variable that reference before assignment. You can declare it in global by writing it before the while loop.
      Or you may drop me an email with your code at tech.to.tinker@gmail.com

    • @ImnotChuck.
      @ImnotChuck. 3 ปีที่แล้ว

      @@TechToTinker I just copy/pasted your code from your blog. Does it give the same errors for you? Thanks.

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

      @@ImnotChuck. can you try to copy it again? Seems like the python code has been modified after I formatted it for website upload. It should work now. Cheers

    • @ImnotChuck.
      @ImnotChuck. 3 ปีที่แล้ว

      @@TechToTinker Now, the code is working. Thanks.

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

      @@ImnotChuck. you're welcome. Thank you.

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

    Could you pleas make a tutorial about neopixel module on esp32?

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

      Hi @Roman Schymura, as of now I don't have a neopixel module. I will maybe in the future videos. Thanks for the suggestion.

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

      @@TechToTinker the neopixl module ist installed in micro Python kN the esp 32.

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

      @@HektorDerHund have you seen this documentation? This might give you some insight: docs.micropython.org/en/latest/esp8266/tutorial/neopixel.html

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

    hello and thanks for this great video. I need to ask something. How can i control esp32 and a regular python code. I am working with some opencv project and i need to send some basic information like this turn on or off the led. I need to do this using wifi. Any ideas or any source that you can suggest? thanks a lot.

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

    Nice job on making a simple server.
    It is easy to imagine cases in which it is difficult or impossible to obtain the IP address which must be entered into a browser.
    For those situations, we have the dhcp_host_name feature which allows us utilize user-friendly names in browsers.
    The trouble is, I cannot get it to work and wonder if ever have? I think we got it working once, but it did not last.
    Any suggestions on how to troubleshoot this will be appreciated.

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

    how i can combine uart , station mode, access point in same code

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

      You can achieve that by learning the basics first then you may take baby steps combining functionalities as you stated.

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

    with this code I v uploaded into my ESP8266 nodemcu V3 board . I can ctrl my led once or two times but soon after my ip will be no longer reachable, Even if I can ping Ip address of my web server. I am tryig it from last 3 days but nothing....kindly respond

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

      @educlub 4u, have you sort this out? I am not sure how to answer you, I am guessing that it could be your wifi router dropping the connection, or it could be the esp losing enough power, or it could be bug in the code. Btw, is there any error?

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

      @@TechToTinker thanx for ur reply....Is it pose any problem if my nodemcu is running on usb power. Coz I am doing the same. Again I wud like to mention here dat, I v 2 nodemcus and both having da same problem. Kindly suggest me if there is any way to control micropython nodemcu by python tkinter gui...coz I am working on dat. Again I wud like to thank u for ur reply....🤗

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

      Sorry but I don't have experience using the tkinter. By the way, you need to be successfully connected to wifi router for this web server to function properly

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

      or try this: th-cam.com/video/LKQvzN_Rk-U/w-d-xo.html
      which basically don't need a wifi router in between.

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

      @@TechToTinker thanx....let me try once again thru this url...thanks again for the reply....🤗

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

    idol nagawa ko to.. wala kang bago dun sa gsm? kung pano mag send at receive ng message dun let say para e on and off ang LED?

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

      Hi @Gregg Heffley nagloko kasi yung SIM800L ko. Supposedly yun yung tutorial 15. Wait mo lang gagawin ko yun :). Thank you.

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

    youu hev najc inglush

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

      Nice to hear that. Cheers my friend. :)