How To Setup a HTTP Web Server With Raspberry Pi Pico W (using WiFi)

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

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

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

    dang u censored Local address how am i supposed to hack u now. 😂😂😂

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

      He had to be %1000000 sure

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

    Great tutorial, thanks! Just a heads-up that there are a number of web serving libraries which could make the work easie...my favourite is microdot which is inspired by Flask and the decorators used to configure HTTP endpoints. Please keep the MicroPython videos coming! (I'll be mentioning this one at the Melbourne MicroPython Meetup tomorrow!)

  • @davidwhite633
    @davidwhite633 ปีที่แล้ว +4

    Great starter video. I really appreciate the basic web server. Just the basics. Nice not having to learn Flask (or whatever) first. Read a pin from the board. Read input from the web. Change an output on the board. Write something out to a web page. That gets me started. Exactly what I needed. Feel I can take this and run with it. Thanks

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

    N'étant pas un fervent de la langue de shakespeare, je m'en suis sorti très correctement et merci pour cette vidéo très explicite. Bravo et merci.

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

    Thank you. Keep em coming. Love the pico w. There should be more of them in a few weeks.

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

    Well well, now you just need to find a Pico W to buy. Chip Shortage sux :/ I mean, i was happy enough to get 2 Pico W's on release day, but i feel so bad for the people trying to get one atm ^^

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

    Thank you for the great tutorial. If it were a little closer, I would thank you personally. Greetings from Poland

  • @L2.Lagrange
    @L2.Lagrange 4 หลายเดือนก่อน

    This looks super useful. I will definitely mess around with this using my Pico. The clicking the buttons seems particularly useful

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

    Just brilliant! This helps makers use MicroPython in powerful new ways. Thank you for this so much!

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

    I did a quick search on your videos and I did not see a video for a Pico W setup as a stand alone AP/WebServer. This video looks as if the Pico W will log into the home network and then the user will access the the Pico w through the home network. A stand alone Pico W could be a GREAT future video. Maybe even utilizing the Push button/LED project for that video also. Just a thought. Outstanding Video!

    • @Core-Electronics
      @Core-Electronics  4 หลายเดือนก่อน

      What a timely comment, we may be working on that exact video right now...

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

      @@Core-Electronics
      Please, do you have a vide on this now?

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

    Thank you, your guides are wonderfully clear and concise. I appreciate them so much.

    • @Core-Electronics
      @Core-Electronics  4 หลายเดือนก่อน

      Glad we can get people making! :)

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

    A good tutorial that gives a basic web interface for the Pico. Other videos I've watched cover Flask but in a full blown Python/Pi 3/4/zero context. It's good that you get to see results from code that you can follow along with. Will experiment with my Piicodev OLED, Atmospheric sensor, and Li-ion battery. Hopefully capture data to a CSV file and create a remote data logger.

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

    Good, tank's very much Master..

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

    Amazing, really good tutorial, I want to have that board do practice and play, unlikely are sold out for now.

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

      I don't know where you live, but if shipping isn't too expensive, just order some from Germany. All other Raspberry boards are completely sold out, but there seems to be more than enough of the Pico and Pico W left. I bought 4 Pico and 4 Pico W myself yesterday, so I can assure you that you will get some here.

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

      @@GermanBluntSmoker Thanks for the advice, I live in Japan, few days ago I tried from UK but i was rejected because of the address, I bought from aliexpress I hope it arrives and works well.

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

    Hi, great video. What do I have to change if I want the website to be addressable from different wifis?

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

    I'm trying to connect the raspberry pi Pico W with wifi and successful, but when i copy paste the ip address to browse it's not opening. I tried many times but failed.
    Can you help me to figure out the fault ?
    I've also a stable internet connection.

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

    This tutorial really helped me

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

    appreciate the walkthrough. Felt like I was getting some questionable vibes at the beginning tho XD

    • @Core-Electronics
      @Core-Electronics  ปีที่แล้ว +1

      Can't have you peeping our local IP address #haxxor 😎

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

    That was a really useful tutorial! Would you consider doing a tutorial on combining a Pico w web server with a BME280? I've been programming in C for years, and I am now starting to learn python, and I think a project like that would be good one to learn how to remotely read sensors.

    • @Core-Electronics
      @Core-Electronics  ปีที่แล้ว +2

      Check out the HomeStation project by Liam on our forums! His example presents a live dashboard using a BME280.
      forum.core-electronics.com.au/t/homestation-a-pico-w-powered-webpage-dashboard/14900

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

      @@Core-Electronics Thanks for the link, that project is just what I am looking for.

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

    Fantastic video & resources. Will be a huge benefit to my students. Much much appreciated!

  • @Amihuman-ey7ne
    @Amihuman-ey7ne 3 หลายเดือนก่อน

    Very informative and amazing video. I tried the same using my Rpi zero W but ran into machine ModuleNotFound error. Could you suggest any corrections for this? Thank you

    • @Core-Electronics
      @Core-Electronics  3 หลายเดือนก่อน

      This will only work for a Pico W Microcontroller, not Raspberry Pi's single board computers. We don't have a guide on it unfortunately (thats a good idea though), but you can find others along the lines of "Rpi Zero W host HTTP Server"

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

    I really dig your channel. Thanks for all the cool projects.

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

    Thanks that is a really cool started project. Can you also make a video on micropython vs circuitPython. I'm new to this and it's all very confusing. Appreciate the efforts.❤

  • @user-cj4jm1fx6b
    @user-cj4jm1fx6b ปีที่แล้ว

    Great video! I got mine working.

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

    Interesting stuff, are there any projects about setting up a stand-alone webserver to serve webpages (without being connected to the Internet)

    • @Core-Electronics
      @Core-Electronics  2 หลายเดือนก่อน +1

      I'm a little confused about what you are looking for, this method should work even if your local wireless network doesn't have internet. If you don't want to use an existing wireless network, we have a tutorial on how to make the pico serve a webpage over its own network that it hosts!
      core-electronics.com.au/courses/raspberry-pi-pico-workshop/#5.3-hosting-a-wi-fi-access-pint-and-web-page

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

      @@Core-Electronics Thanks for the response, I'll have a read through. I think that's what I was looking for. Something really simple, (like a wifi hard-drive) but where you can just link to the wifi coming from the Pi and it takes you to a webpage and lets you access the content (as web pages). Be great for workshops in the middle of nowhere, or camp sites or could provide info in isolated places.

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

    That works. Be better as a webhost though.

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

    Thank you for the video.
    What can I do to acces the html page anywhere? Instead of localhost

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

    Is it possible to control a servo motor through a web server as well using the raspberry pi Pico w?

    • @Core-Electronics
      @Core-Electronics  ปีที่แล้ว +1

      Yes! The best way to get technical help for any of our content is on the forums: forum.core-electronics.com.au/
      We're full-time makers and are on the forums every working day!

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

    and add a sd-card reader for extra file storage ...

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

    Thanks! This was a great tutorial for my first Pico W project. I took an additional step and set up port forwarding on my router to allow access from a public IP address using a specific port. That worked great, until I had different users try it from different locations and some had trouble connecting until I reboot the pico. Maybe it gets stuck on a connection session with the first person to connect? Could this be solved if we end the connection with the logged in user after X minutes of inactivity so that the server is waiting for a new connection without a reboot? I'm new to python - any suggestions are welcome.

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

    Thanks for this, I find your presentation well paced and easy to follow. I am trying to re-program a garden watering system to include a wifi connection. All the examples of Pico W web servers I've found involve an infinite loop for the server. What I need is code running the watering system to run with the server in the background. The server traffic will be minimal.. just me on the LAN occasionally. I'm not sure if I should try to use uasyncio or just run through the server code every few cycles to see if there is incoming requests. Any advice?

    • @Core-Electronics
      @Core-Electronics  ปีที่แล้ว

      The best way to get technical help for any of our content is on the forums: forum.core-electronics.com.au/
      We're full-time makers and are on the forums every working day!

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

      The RP2040 has two independent cores.
      You can run the server on an infinite loop, and have the other core handling I/O, along with the help of the 4 independent PIO cores, if required.
      A very powerful little chip.

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

    Thank you. I am trying to run example code for Arduino nano rp2040 connect but I am seeing error 'OSError: [Errno 1] EPERM' for the line 'wlan.connect(ssid, password)'

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

    This video brings another thought/question. I'm currently using a Rpi0W as a control server for my Rigol DM3058e, thanks to your video on making the Rigol stuff talk to each other. I have the PSU and the DSO on LAN but the DMM only has USB-B. The Rpi0w is really a waste of resources for running simple webserver for control/datalogging. I'm wondering if a Pico with a webserver would handle that small function. Only tricky part is the USB connection.... Can it be done?

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

    I’m nitpicking little bit here, but query in GET should not change state. It is supposed to be idempotent.
    To change state, use POST.
    Nice demo anyway

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

    Outstanding video, Thanks! Is It possible to read sensor within a wifi direct connection ? For example, reading over Wi-Fi Direct between a smartphone app and a Pico ?

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

      could you do that? i want to do the same thing

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

    Great video as always from Core Electronics. I am trying to implement a pico w with an LDR sensor that logs time and date to a CSV file when my central heating comes on and goes off. I have all that aspect of the project working just great but I want to be able to download the CSV file from the pico via a link on a web page. I am very close but I am unable to download the file, any file, and I cant find out why or how to do it. It seems like it should be such an easy thing to do. All the examples of webserver functionality seem to focus on LED manipulation. Who needs to turn on an LED over the internet? I would really appreciate any help or info on how I can achieve file downloads over my LAN. Thanks in advance.

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

    Great. I have a question, How do you manage multiple pico w with the same feature on mobile phone/web-app?

    • @Jo-re2ye
      @Jo-re2ye หลายเดือนก่อน

      You would give each its own IP address

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

    👏👏
    Great tutorial, Michael, thanks a lot for this!
    I need to open a file in OneDrive and save/read some log data (e.g. temperature) there with my Pico W.
    Any hints how can I do it???
    Greetings from Brazil!!!

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

      I think this is way too much to handle for the Pico, you might need a Raspberry Pi 3 or 4 (or any SBC for that matter), not a microcontroller for this, as you need to handle authentication and file upload

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

    how do you upload a separate html file and reference it instead

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

    sir, On the Raspberry Pi 4 model, is it possible to run two programmes at the same time?

    • @Jo-re2ye
      @Jo-re2ye หลายเดือนก่อน

      Even 10, but this about the pi pico. Here to you can run multiple processed as it has 2 cores, or you can use uasync library for cooperative sharing of a single core. There are also 8 state machines, but those are a bit trickier to program. It's a really powerful little device

  • @Michael-pw1gc
    @Michael-pw1gc ปีที่แล้ว

    I have the problem that fail massage is always present and I can power the pico how often I like new but it never solve the Issue.

  • @엄브릿지
    @엄브릿지 7 หลายเดือนก่อน

    Does it work even if the pc is turned off?

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

    Would I be able to use a Raspberry Pi Pico W as a Backup DNS Server to keep my Internet Online if my Raspberry Pi 4 goes Offline? My problem is my Router makes me put in two DNS Addresses so I set them both as the PiHole DNS Addresses I've tried setting the Secondary DNS as Google's DNS but if I do that and turn off my Raspberry Pi 4 it doesn't allow me to connect to the Internet unless I turn the Raspberry Pi 4 back on and with the Prices of Raspberry Pi 4 and even the Raspberry Pi 3 right now I don't really want to spend that amount of money on another one right now if I don't have to?

    • @Core-Electronics
      @Core-Electronics  ปีที่แล้ว

      This is a necessary constraint of PiHole - blocked queries *need* to fail. It's worth a shot! sounds like an interesting project. The trouble will be keeping the DNS tables synchronised between devices.

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

    Hi when I try to import network in thonny I get an import error in circuit python please help

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

    How can i adjust the code, so i can simply only show a website without buttons, leds or anything else

    • @Jo-re2ye
      @Jo-re2ye หลายเดือนก่อน

      Change the HTML?

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

    For some reason it said trace back modulenotfounderror: no modula name ‘network’
    Why is this happening

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

    Why is from machine import ptin not working?

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

    I'm having trouble connecting the Raspberry pi pico W to an open wi-fi from a hotel lobby, is this because of security measures or should I just try this at home instead?

    • @Core-Electronics
      @Core-Electronics  ปีที่แล้ว +1

      I'd try again at home on your own network. Public networks don't allow connections between local users.

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

      @@Core-Electronics Holy crap it worked! thank you for this tutorial!

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

      @@Core-Electronics Question on the Hardware test, how is the pin 15 and pin 16 complete the circuit if none of them have an LED light on there or has nothing of ground in it at least that is what the paper the pico W basic set brought)
      led = Pin(15, Pin.OUT)
      button = Pin(16, Pin.IN, Pin.PULL_UP)
      I've been trying to figure that out for 1 hour or so, but I can't seem to find the logic in it
      (I've followed the video and it works I just want to understand it better)

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

      I realized that if you put these pin numbers in here:
      led = Pin(16, Pin.OUT)
      button = Pin(15, Pin.IN, Pin.PULL_UP)
      the light gets dimmer, as if the voltage coming from over there is too low and that makes it reach less to the LED light. don't know if that's true but I'm still figuring things out. Thanks in Advanced

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

    >>> %Run -c $EDITOR_CONTENT
    MPY: soft reboot
    waiting for connection...
    Traceback (most recent call last):
    File "", line 42, in
    RuntimeError: network connection failed
    >>>
    But my rpi is pico w

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

    Question to the author can i run pi hole on the new raspebbry pico w

    • @Core-Electronics
      @Core-Electronics  2 ปีที่แล้ว +1

      Hi Mike, Pi Hole is an application that is designed for Linux based systems, so it won't run on a Pico W as it is only a Microcontroller and not a complete computer. It may be possible to create an ad blocker that runs on a Pico W but we seriously doubt its efficacy when compared to a Raspberry Pi running Pi Hole. Thanks for the question 🙂

  • @Bobo-ox7fj
    @Bobo-ox7fj ปีที่แล้ว

    Man, you didn't even censor the fact that your local network uses IP! I might have assumed you were operating on AppleTalk.

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

    Is this server safe and secure?

    • @Jo-re2ye
      @Jo-re2ye หลายเดือนก่อน

      Nope

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

    No one can do this with arduino ide and c++ all write to slow python where word going

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

    you forgot to blur your local ip address at 8:23

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

    so you dont have to edit as much, you dont have to blur out your local ip. 192.168.x.x or 10.0.x.x

    • @Core-Electronics
      @Core-Electronics  ปีที่แล้ว +1

      Enterprise network! Can't be too revealing 😉

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

    These

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

    bro really censored a private ip

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

    This man censoring his local ip

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

    haha you're blurring your local ip address, let me guess, the address starts with 192.168.0. no need to hide that. nobody will be able to access that unless you specifically allow someone on your local network, afterwhich it is already to late I'm afraid

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

    I set my ROUTER to always give each PICO a STATIC IP ADDRESS, and still got the 'address in use error". So I put
    wlan.disconnect() # release the current IP#
    time.sleep(3) # time for router to react
    right after the line "wlan.active(True)". I almost never get that error now.

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

    WHY would you hide a local address?

    • @Core-Electronics
      @Core-Electronics  ปีที่แล้ว

      Can't be too careful! Even a local IP exposes *some* information about internal network structure. It seems to provoke lots of engagement too 😅

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

    Dude, I can't take someone who censors his LOCAL IP seriously.

    • @Core-Electronics
      @Core-Electronics  ปีที่แล้ว +1

      Glad that's your only complaint for this tutorial - I guess the rest was pretty clear then 😀
      There's a lot more going on in an enterprise network than your average household network. We don't want to reveal any information about the network structure.

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

      @@Core-Electronics So why did you even leave the "192" in the first place? It would have made more sense if you censored your whole IP, right? Also, I don't think revealing a single *local* IP address could do any harm or give something away about your network, except the address range (which you already pretty much revealed).