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

Поділитися
Вставка
  • Опубліковано 28 жов 2020
  • 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.com/2020/10/28/0...
    Please do COMMENT, LIKE, SHARE, and SUBSCRIBE.
    Thank you,
    George Bantique
    #TechToTinker
    #ESP32MicroPython
    #MicroPython
  • Наука та технологія

КОМЕНТАРІ • 56

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

    Thanks for the tutorial! Much appreciated!

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

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

  • @vladimirastrelin1719
    @vladimirastrelin1719 Рік тому +2

    Thank you very much. Your tutoril works perfectly ! and, by the way, you are a great teacher..Thank you !

  • @projectjam7020
    @projectjam7020 3 місяці тому

    Excellent video! Thank you for sharing.

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

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

  • @ssgoh4968
    @ssgoh4968 3 роки тому +1

    Thanks for the effort. Video is Easy to understand.

    • @TechToTinker
      @TechToTinker  3 роки тому

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

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

    Awesome!

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

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

  • @nicolaslance8518
    @nicolaslance8518 2 роки тому +5

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

  • @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.

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

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

  • @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.

  • @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.

  • @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

  • @mytechnotalent
    @mytechnotalent 3 роки тому

    Great

  • @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?

  • @mehranmorgan
    @mehranmorgan 13 днів тому

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

  • @parthpatel1605
    @parthpatel1605 3 роки тому

    Nice

    • @TechToTinker
      @TechToTinker  3 роки тому

      @parth patel, glad that you liked it. Thanks

  • @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.

  • @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

  • @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: ua-cam.com/video/LKQvzN_Rk-U/v-deo.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....🤗

  • @brianchu1641
    @brianchu1641 8 місяців тому

    blog post doesn't work

  • @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.

  • @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.

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

    youu hev najc inglush

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

      Nice to hear that. Cheers my friend. :)

  • @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