Это видео недоступно.
Сожалеем об этом.

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

Поделиться
HTML-код
  • Опубликовано: 17 авг 2024
  • 00:00 Introduction
    01:00 initail setup (wlan scan and mac)
    02:40 blinking on board LED
    03:58 Initial Wlan / Wifi (wlan scan and mac)
    06:57 Static Website
    14:15 Website with GPIO control and state display
    In this tutorial i show how to setup a raspberry Pi Pico w (or other board with a RP2040 and WiFI) and i show how to setup the WLAN and read out the Mac address. I explain how to update the UF2 file I´m showing how to setup a Website and control GPIO´s with it. For the programming code i´m using Micro Python.
    -----------------------------------------------------------------
    Links :
    UF2 file :
    www.raspberryp...
    Gibthub rep for files:
    github.com/Lut...
    Thonny:
    thonny.org/
    ----------------------------------------------
    Buy Raspberry Pi W and support my channel without extra costs :
    US
    Pi Pico W:
    amzn.to/3WJIrES*
    Pi Pico with full starter KIT:
    amzn.to/3XWZkga*
    Germany:
    Pi Pico W:
    amzn.to/3JowFfY*
    Pi Pico with full starter KIT:
    amzn.to/3Dfpnr9*
    *affiliate link

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

  • @hostasgrasses
    @hostasgrasses Год назад +2

    My understanding is growing, thanks for your tutorial! Gregory

  • @pierreduranleau2514
    @pierreduranleau2514 2 года назад +2

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

  • @Wythaneye
    @Wythaneye Год назад +3

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

  • @HarneyPhoto
    @HarneyPhoto 7 месяцев назад +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 10 месяцев назад

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

  • @arielcairoli2473
    @arielcairoli2473 6 месяцев назад

    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.

  • @torque6389
    @torque6389 Год назад

    Very helpful!

  • @buinguyenvong
    @buinguyenvong Год назад

    Great tutorial! thanks a lot

    • @lutz4tech
      @lutz4tech  Год назад

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

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

  • @lemur8111
    @lemur8111 Год назад +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  Год назад +1

      Hi lemure,
      Thank you for your Feedback.
      ruclips.net/video/wCac3uIW5nU/видео.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.

    • @lemur8111
      @lemur8111 Год назад +1

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

  • @tompaquette7138
    @tompaquette7138 Год назад

    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  Год назад +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 Год назад +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  Год назад +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 ;) )
      ruclips.net/video/wCac3uIW5nU/видео.html

  • @TOMTOM-nh3nl
    @TOMTOM-nh3nl Год назад

    Thank YOu

  • @Yurpt
    @Yurpt Год назад

    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  Год назад

      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.

  • @devitralf
    @devitralf Год назад +2

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

  • @jazzjohn2
    @jazzjohn2 Год назад

    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  Год назад +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 Год назад

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

    • @jazzjohn2
      @jazzjohn2 Год назад

      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  Год назад

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

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

  • @qweqweqweqw1187
    @qweqweqweqw1187 Год назад

    Can the pico w connect to MSSQL database?

    • @lutz4tech
      @lutz4tech  Год назад

      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 Год назад

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

    • @lutz4tech
      @lutz4tech  Год назад

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

  • @brynnrogers5081
    @brynnrogers5081 Год назад

    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  Год назад +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 7 месяцев назад

    Python dislike