Step-by-Step Pi Pico W: WIFI, gpio Control and Webserver

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

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

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

    My understanding is growing, thanks for your tutorial! Gregory

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

    Wow, this is a great tutorial. I like your teaching style!

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

    Thanks, I'm new to this python, and to Pico. Your help is appreciated.

  • @HarneyPhoto
    @HarneyPhoto 11 หลายเดือนก่อน +1

    Hello Lutz. Thanks for the tutorial been running your code so see if it will work in my situation. Only thing i changed was the Netwroking Mywifi and added my own.
    The only problem i have is the the code runs fine, the website is accessible, but if you close the browser, (phone or desktop) and go back to it later, the website is inaccessible. Running a network ip scanner, the pico w can't be pinged. Yet looking on thonny (still connected to the pico w), there are no disconnect errors. The only change I made was to the SSID Password details. Did you have this problem or do you know how to make it more stable when the website is not accessed for a while (3 minutes or longer)

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

    Excellent information .. Thank You for sharing .. Cheers :)

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

    Hello, great video!
    Is there a way to retrieve information from a slider in the html?
    Like if I set the slider on the webpage to half for example, a variable in the program would be 0.5
    I only saw boolean outputs on webpages in micropython so i don't know if there is a way to do this with analog outputs

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

      Hi lemure,
      Thank you for your Feedback.
      th-cam.com/video/wCac3uIW5nU/w-d-xo.html
      Here i explain how to transmit adjustable values.
      If you use the Slider as an Input instead of the field i use, you have it.

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

      @@lutz4tech thank's a lot for responding that fast!

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

    New to pi. I need 5 analog sensors to be physically seperate from the pi but sending values to the main pi. Can I do this with pico w? For 5 analog signals, It would require two of them wouldn't it?

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

      Yes your right. A pi Pico has 3 adc's. So you need two of them. Propably still cheaper than using a adc expansion and a Pico.
      But you need two think about how to send the Signals to the "Main Pi". You need some Kind of a Server / Client architecture for it.

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

    How would you add an adjustable timer function to the led toggle button on the webpage?
    I figured out how to refresh the page automatically! Just add this to your html:
    I put mine just below the head of the page.

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

      Hi, yeah with the Word "adjustable" you make it directly complicate :D my lazy Idea would be to use different Buttons with different Timings. That whot you mean to send Parameters is more complex i can put it in my todo list for an Others Video.
      Thanks for that hint with the automatic refresh of the Page!

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

      @@lutz4tech just like a text slot where it looks for a time in minutes to set the toggle on for and if not entered its toggled on until toggled off. I would appreciate any help you can offer!

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

      I needed to finish an other Video at first, but today i finished your wish. I hope its still usefull for you (and a million others ;) )
      th-cam.com/video/wCac3uIW5nU/w-d-xo.html

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

    Hi Lutz, do you have the webserver example with textbox but with arduino language.
    I want to use both core and microPhyton dont work well.

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

    Hi, Is it possible to access the Raspberry pi pico W outside the wifi network? I've tried to forward ports on the router, but I can't access it.

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

      Overall this should work.Did you sucessfullly tried the Port forward with an other Server?
      What comes in my mind why it May Not work are two Things.
      1) You need to have your Public IP to do this. So not your local IP of the Pico. At best this one is static and dies mit change so you can reach your pi erverytime with the Same IP.
      2) The Code i used an adapted is only able to serve one Client at a time. So If you are Connected from your WiFi and try at the Same time an external Connection the pi will Not respond to the second request.
      I hope this helps you let me know if not.

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

    My led does not blink when i enter the exact same code

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

      If you use a pi pico W you need to Update the uf2 File. I explain this in the beginning of the Video.

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

    If the wifi signal is temporally lost, the pico hangs and will not reconnect when the signal returns. Is there a way to utilize the WDT to cause a reboot in the case of a lost signal?

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

      Hi, nice question thanks for this !
      Well the watchdog is to be used with:
      from machine import WDT
      wdt = WDT(timeout=2000) # enable it with a timeout of 2s
      wdt.feed()
      If you place the feeding somewhere where it can't bei reached in Case you Looser the Connection it should Work.
      If i have time i'll try it out, and give you a more detailed Feedback. May i make a Video about this. Could be a really interesting question.

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

      @@lutz4tech I just started working on it too and will let you know what happens. Thanks.

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

      I got it working. Placed if wlan.status()>2 wdt.feed() in the loop with await asyncio.sleep(check_interval_sec)
      Checked it by turning phone mobile hot spot on and off.

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

      @@jazzjohn2 nice !
      Just an other Idea and i didn't tried it but May this works without the wdt If you use:
      If WLAN.isconnected()
      WLAN.connect
      ?
      May miss Something but this could be easier and you don't loose the state of the Pins.

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

    Can the pico w connect to MSSQL database?

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

      Well, i think it can, but i didn't found a lib for this. So you would need to make your own libary and that would Take a while.
      I think it would be easier to list the Data you eant to Store in the Database on a Website, and let the Database Server Poll the Website for Updates.

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

      @@lutz4tech Thanks,your video is very helpful I will try it.

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

      @@qweqweqweqw1187 thank you, let me know if you need something Else. Maybe i can do a Video about it.

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

    Great tutorial! thanks a lot

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

      I'm glad you like it. Thanks a lot for your Feedback!

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

    where is the mywifi module, it doesn't exist on github? there is an error, because the mywifi module doesn't exist

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

    Very helpful!

  • @TOMTOM-nh3nl
    @TOMTOM-nh3nl ปีที่แล้ว

    Thank YOu

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

    LED is not pin 25, 'LED' works instead. But WTF is 'LED'? it must map to a pin number, where do I find what pin it is? pin 0 ?

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

      Yeah normaly you are right with your Idea, but this time not 😉
      When you Look into the schematic (
      www.google.com/url?q=datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf&sa=U&ved=2ahUKEwjjxanRhMr7AhWG7KQKHVv2B5oQFnoECAoQAg&usg=AOvVaw1WGyuOD6vwKLFp-Tke_e1P ) you See that it's coming from the Wireless Modul and Not from the rp2040.
      So the word "Led" ist masking the complexity a bit for the user 😉
      I Hope this helps you.

  • @alex-ku9yt
    @alex-ku9yt 11 หลายเดือนก่อน

    Python dislike