Raspberry Pi Pico W: Wireless Weather Station
Vložit
- čas přidán 13. 08. 2022
- Raspberry Pi Pico W microcontroller review, plus tutorial connecting the board to a BME280 sensor module to create a wireless weather station that transmits temperature, pressure and humidity readings to a web browser.
On this web page you can find the wiring diagram and a link to the final code:
www.explainingcomputers.com/p...
The excellent Pi Pico W "getting started" instructions from the Raspberry Pi Foundation are here:
projects.raspberrypi.org/en/p...
The page with links to download the MicroPython UF2 file is here:
www.raspberrypi.com/documenta...
The Pimoroni BME280 sensor I used in the video is available directly from Pimoroni, or on Amazon.co.uk here: amzn.to/3Q18Rjy A compatible board is available on Amazon.com here: amzn.to/3PXnF1q Note that these are affiliate links, and that as an Amazon Associate I earn a commission from any qualifying purchases you may make.
If you like this video, you may also be interested in my other Pi Pico videos, including:
Raspberry Pi Pico W: WiFi Controlled Robot:
• Raspberry Pi Pico W: W...
Raspberry Pi Pico: Inputs & Servos:
• Raspberry Pi Pico: Inp...
PicoMite: Running BASIC on a Raspberry Pi Pico:
• PicoMite: Running BASI...
IN CASE OF DIFFICULTIES:
If during your experimentation you end up with a Pi Pico W that executes a program that you cannot interrupt by pressing Ctrl-C or Ctrl-F2 in Thonny, you can return the board to its factory state by holding down the boot select switch, connecting to a PC, and copying over a special UF2 file to reset the flash. You can find a link to this UF2 file at the bottom of this page:
www.raspberrypi.com/documenta...
Note that after execution you will have to reinstall MicroPython and any required libraries, such as the one for the BME280. All programs will also be erased! Hence, during program development, it is wise to save a copy to both the Pico W and to the PC you are working on.
For additional ExplainingComputers videos and other content, you can become a channel member here:
/ @explainingcomputers
More videos on computing and related topics can be found at / explainingcomputers
You may also like my ExplainingTheFuture channel at: / explainingthefuture
Chapters:
00:44 Pico + Wireless
02:37 MicroPython & Thonny
06:23 BME280 (Sensor)
08:13 Reading the Sensor
11:26 Final Code
15:13 Remote Test
16:23 Wrap
#RaspberryPicoW #PicoW #BME280 #ExplainingComputers - Věda a technologie
17 minutes of pure tech - I remember when we had this quality of tech-exploration and project building on mainstream TV with Microlive etc.... but thankfully we have Chris, and this great channel.
Cheers Mr Barnatt and the hard work you do to educate and entertain us.....
totally agree
A couple of minutes in and I was getting that Microlive feel
"Television is something the Russians invented to destroy American education." -- Paul Erdős. But then the Internet came to rescue us.
I have watched MANY tech videos. You are EXTREMELY good at making these kinds of videos.
They are to the point, clear, cover the important parts without going down rabbit holes - and best of all, provide quality resources that actually help.
Please keep it up! And if you arent already covering this topic and are very brave, consider ROS2 tutorials (without using containers).
Thanks again. Subbed. (I’ve seen your work before but have no clue why I wasn’t subbed already. I just assumed I was already as you’re that good!)
Welcome aboard!
Another project for my grandsons to have a go at. Thanks for explaining in such a straight forward way.
I’ll just open the little toolbox and the box of bits, set up my iPad for them to watch you tell them what to do and I’ll slope off and have a glass of cider, cheers!
Great parenting idea! I'm going to put that one in my back pocket for when my son comes of age. The sheer variety of microcontrollers and SBCs will be overwhelming in a decade. I suppose it'll make for some fun toy robots though.
A very versatile addition to RPi family. I love the projects re-creating 8-bit computers using the Pico - it's amazing how powerful these SOCs have become!
Once again you show this is a 'real' computing channel as opposed to a gaming channel so many of the bigger ones are. It’s surprising how many people want to learn about the things you show us how to do. I also think you have one of the best comment sections full of knowledgeable people.
Your channel reminds me of those old BBC coding programmes that they used to show when I was a kid... Filling our heads with fancy ideas, sparking our imaginations and above all showing us that this arcane magic was within our very grasps if we just pushed our envelopes a bit and tried something new.
I honestly feel that the Pico W is now where the original RPi intended to be... with the added benefit of wifi!
I really want to thank you for all your hard work in your channel. I'm saving a lot of your videos and learning from them so I can do amazing stuff like this with my daughter when she's old enough to understand the basics of it.
As usual. One of the best videos. I must say " Nobody can explain things like you"... Thank you for such an amazing tutorial.
Thank you for all that you have done over the years! This video was amazing, and I always look forward to seeing your videos! Great work!
Awesome. I've seen this guy being used as mod for classic consoles such as The original Xbox, PS2 and Xbox 360 but never for this application. Great to see it is this versatile. Keep it up, Sir 👍
Don't forget the GameCube! Go PicoBoot!
@@AmyGrrl78 Yes. It's been used in so many of them I can't remember them all at times 🤣. Go PICO Go Go.
Agreed, Chris is a very versatile guy.
@@jeyendeoso His versatility lies in his team-up with Mr Scissors and Stanley the Knife. They make a computer super team of sorts.
Greetings, another relaxing Sunday morning with Explaining Computers. Now I need to go out and purchase a Pico W. Thank you once again for the quality information. Stay well my friend!
Greetings! A very different kind of board to the LattePanda 3 Delta. :)
@@ExplainingComputers YES, indeed! Sadly, in short supply locally as everything else. One to a customer at Microcenter in the U.S. and must purchase in-store.
I absolutely LOVE these minimalistic little machines! 🙏💪
I love these projects you do Chris, thanks for the fun tutorial.
Although relatively simple, this video reminded me why I love tech myself! The moment you launched the website, I knew it will work, but it still felt satisfying seeing it in action. Well explained and I really hope it will help newcomers with the microcontroller basics. Will be making my honours dissertation using a Pico W system this year, so I hope my faculty likes it as well :)
Cheers!
Great to hear that you are using a Pico W in your dissertation. :) Fantastic.
The bit outside at the end got me good, thanks for explaining computers to us for all these years, you truly are a treasure
Thanks for watching.
It's funny, but I originally bought my PiZeroW to do that task... and have been too "distracted" to get it running. Now it is not just possible, but easier, with even less hardware, and even lower power demands. The way of the computer world in microcosm. Thank you Chris.
Yeah, every generation gets faster and cheaper. Probably even easier. I just love how Computers are so great for our lives.
It's funny but I have a PiZeroW I purchased for this too but haven't used because I couldn't figure out how to power it outside. Thanks Chris for making me aware of the PicoW, I'll be grabbing one of them now.
@@kaiying74 Jamie, I found that one of my USB power banks for adding power to a phone will run a PiZeroW. The other one will not. But it is worth your trying a few before buying if you too have the need to power one outside and without any trailing wires.
Obviously the same power bank would be great for a Pico.
Now, if only it can predict when it will rain... 😅
Anyway, that was another banger of a video and one cool little project too!
Really like the practical and very useful projects using the inexpensive pi series computers. Thank you for your hard work creating these great educational videos. You really do a great job explaining things in a very straight forward way with a little humor mixed in for fun.
Looks like you’ve been hacked Chris.
Very interesting and informative. This will be great for running my garden railroad wirelessly. Thanks
So many possibilities with this board. I like the sound of your garden railroad. :)
@@ExplainingComputers I have CZcams video on my channel of my trains. I’ll send a link on the members only side 🚀’s 🚂’s 🖥’s
sounds like you are on the right track
@@ironfist7789 - thanks, good comment. :)
Did you mean "Wirelessly" or without wires ?
Simple, useful and inexpensive tech. I love it. 🙂
Thanks for another great video Chris.
Terrific, especially the webpage for the readings. Well done 👏🏼👏🏼
20 degrees C!!! Lucky bugger, it's 29 down here in Hampshire!
Adding the wireless functionality is such a great idea which opens so many new opportunities for enthusiastic users.
Thanks for showing me how transmit data using formated string output. I really appreciate it 👍!
Yay! another use for my favorite little 'puter line!
Greetings Leslie -- and third comment today! :) Bronze medal to you. :)
I’ve been fighting the good fight against lack of humidity in my house and I’m absolutely going to build this for the front of my house where my existing sensors can’t reach!! Great video!
Good luck!
Thanks for the video! Always enjoy your weather station videos.
That video flew by - I was totally fascinated by what that little Pico could do. Looking forward to more projects!
Greetings Chris.
Another fresh video And You Looking Good Chris :)
Thanks, Chris!
This is just what I wanted - I will have a couple of those sensors with me tomorrow.
Bought the Pico W a few weeks ago - this will be fun! 😊
Now this is what I call action! :)
@@ExplainingComputers I have my moments!
i think this tiny project is quite useful specially in this days that the weather is going berserk
In this hot weather I think it's a good idea to use PICO to control a fan and a humidifier to justify the room temperature,
or maybe we can clone an Air Conditioner IR signals then use that to write a little program to make it act like crazy,
or, what about converting an old washing machine with mechanical program selector to a digital one.
So many applications for this lovely little PICO
Thanks Chris and have a nice weekend
I'm waiting for quality MQTT library for Pico W. At this point I can work around it with sockets or other network connections from more advanced Pi Zero and Linux but it would be great to just push data into queue and process it later.
What's wrong with the existing MQTT libraries?
@@Jimmy_Jones have you seen C one?
There is one from Paho but it is for C++ and not exactly works on Pico. It works fine on STM32 HAL.
It shouldn’t take too long as it’s also available on other wifi microcontrollers. But I agree that it’s a priority requirement for networked microcontrollers.
@@CallousCoder there are some use cases. But I want C so for now it is screwed anyway ;)
@@SergiuszRoszczyk I agree, but I think it won’t take long for a C MQTT client to pop-up. It’s a simple enough protocol, but it depends on the ip stack implementation of the pico how easy it is to use.
Especially TLS, that’s always non-trivial. But when MQTT C lib is there, I’ll finally be in on the pico. The pico W finally made it a viable platform for me. And I’m actually excited for it now. On its release I didn’t see it as a rival to the ESP32s I tend to use.
this is the content I had been waiting for since I ordered it on release day. thanks !
Sorry I took so long to post this! The launch of Linux Mint 21 got in the way last week.
Interesting project, Chris !! Your videos never fail to teach new things or two.
Thanks so much Chris, All of these projects are very exciting!
A new "Low Tech" demonstration... of very high level, as you are used to it! Hats off to you and thank you!
Great Stuff. I realized the project you explained, step by step, in about 45 min...and added also the LED and board temperature as per RPI Foundation code. Thank you for these fantastic videos.
Great to hear! :)
Thanks very much Chris! I am going to do as Sprocket N and get the grandkids going on this project. Very clear and fun! Thanks for your time making these. Best regards, Robert
Good luck with it!
Afternoon Doc! . . . Hope you're well and everything is going to plan.
As ever, a really interesting and engaging project, superbly explained. Thank you, Chris!
Perhaps well understood by most, the two major learning points for me were:
a) the importance of indenting code; although I could get the code to read the sensor and send the reading to the shell in the first segment of the tutorial, an error was generated in line 53 whenever I later tried to run the full code. I eventually worked out that the 'while True:' statement, and subsequent lines were not indented appropriately on my Pico code.
b) the second point was to remember to press the 'STOP' icon before trying to run newly edited code.
Very satisfying to get it all working!
Glad you got it working. :)
What a neat idea! I live in a rural area, so all the weather apps that I can get on my phone and the internet do not show me the weather conditions in my immediate vicinity -- they all grab data from the nearest official weather station which is easily 20 miles away, perhaps 25. This would give me a great way to quickly check the conditions outside my house -- even remotely, if I opened a port on my router and redirected the Pico's web-server to that port. Plus it'd just be a cool flex to be able to show this off to my friends and family. 🙂 Thanks!
Great Video Chris - explained very well and always great at enabling us to expand knowledge. Very useful information. Thank you. 🙂
Extremely grateful for your work - so glad that I stumbled upon your channel, exactly what I was looking for.
As always, very informative and very interesting. Thank you Chris and keep up the great work.
Great little project. And nudging me towards adding a pico w to my ever expanding collection of raspberry Pis.
Great video Chris, I definitely need to pick up one of these Pico W's for some projects!
I'm already in the process of building exactly this. 😁
Excellent timing. 👍
Very interesting Chris. An excellent project executed flawlessly. I don't know how you come up with differing ideas every week, but i am glad you do. Thanks for sharing have a peaceful week.
Greetings Brian. :)
Exactly what I was going to build, well once I can actually buy 1 or 2 in Australia! Thanks, you saved me some work on the web server side.
I've really enjoyed the wireless weather station video a fun & interesting project to make! Thank you Chris for another interesting Sunday & much appreciated, looking forward to the next one. :)
Amazing Chris. Can’t wait for the pico w to be on sale here in Australia.
Thanks Chris! Your videos always brighten my day!
Great to hear! :)
Absolutely marvellous. Thank you. I do enjoy these pico vids.
Thank you for this lucid set of instructions. It has motivated me enough to try it out.
AWESOME video!! I love seeing videos that actually use these SBC in various projects. Really looking forward to the robot video!
This is such a cute and tidy little project! Well done!
@ExplainingComputers Some fake profile just commented on this comment trying to impersonate you. Their profile had only 5 subscribers and emulated yours.. Trying to coax me into messaging on Telegram and then claiming I won a PC. There was no giveaways mentioned in your videos... Can you confirm if it was you or indeed an impersonator? Thanks.
It was not me -- it is a fake account as you have found. It is now banned from posting on this channel, and all all involved parties have been informed of the scam.
Thank you! I will try my hand at this in the future. Great channel, great information well explained.
Good video, added to my winter project list, and give it an outdoor winter test in my screened in porch.
Great, as usual. Especially in projects that aren't likely to have external documentation, legibility > golfed code every time. (When the time comes to change something, you'll know why.)
I would quibble about the output format, though. Transmit only the variable data, (identifiable as fields, CSV being a good first choice), not the constant decoration. KISS.
Dollars to doughnuts, a subsequent change will make it necessary to process the data in a different way, (e.g. as input to some sort of controller), and you don't want to have to dig the numbers out of the surrounding text. That can always be added in the HTML.
Amazing I’ve thought about buying a weather station for my cabin in the woods. But now I think I will do this instead. Thank you!
Always a fun and interesting video, Chris.
+ a ton useful info. Thanks a bunch.
Very good video. Clear and focused as usual
Two minor points: Drag and drop between drives is already a copy operation, not a move, so no need for all the right-click, copy, right-click, paste. Secondly, the first view of the page is potentially showing very old data (what the values were when you previously viewed the page) - socket.accept() will block until the next new connection arrives - try moving the BME read to immediately *after* the client.recv(1024) to see guaranteed-current values.
Came here to say the same thing.
Most times it is easier to ‘click’ the mouse, then move elsewhere, then ‘click’ again… rather than having to hold down the button while moving the mouse.
In my case, neurological damage makes this the case… holding the button down is difficult, it often ‘shakes’ loose…. Clicking if far more exact.
In my case.
The addition of Wi-Fi to the Pico really adds to its potential. Looking forward to your future Pico robot video!
Greetings Perry! :)
Nice simple tutorial, thanks! Ended up building something similar but a little more involved myself, using the Waveshare environmental Sensor, I send the reading over wifi to MTQQ and then graph them using NodeRed/InfluxDB/Grafana combination, the PicoW is great!
this channel is always my happy place for Raspberry Pi things 😊
:)
That as some solid editting on the plugging in of the USB to the computer as we all know it takes at least three goes :D
Cool little project! Thanks 👍🏻✌🏻🇨🇦
Thank you for sharing this idea. I have been needing a way to monitor my attic, and this would sure be a good project to help me feel more comfortable with Python and Raspberry Pi.
Let's add control of a power outlet or two to switch on or off a fan (and/or a heat lamp) as appropriate to automate the moderation of the ambient temperature inside of a chicken coop. Note, the chickens have requested this be tested as a SAFETY CRITICAL application.
All possible -- there are lots of lovely outputs on a Pico. Just needs a relay (or similar) control board.
Enjoyed this excellent video. This month our average high temp is about 97.2 C . This project can't change that but it can help with thermostat settings.Thanks for an excellent practical presentation.
Wow! 97 C is HOT!
Yet another fantastic project video Chris, thank you. Can't wait for the WiFi robot video.
Thanks for the vid. I look forward to building my own weather station.
Great teacher every time i learn from you thank you for your efforts
Excellent soldering technique!
Most excellent video! Thank you for sharing!
Thank you so much for this bit of tech education. We appreciate it greatly.
Thanks for watching!
Awesome. My only fun addition would be implementing a code to change the colors of the text to either red, yellow or green depending upon the threshold of values for instant telling if everything is within normal range.
A very nice idea! :)
Fantastic project Chris! Thx so much🙏😃
Thank you for the super informative video! This channel always has great content to watch. Cheers! Thanks again for the great computing content!!
Thanks for this. At the stamp you list it was on screen during the ALT-TAB. Somebody spotted this yesterday and I applied a blur, but it took some hours to process (active now though). Can I ask that you edit your comment to remove the SSD from it?! :)
Thank you,didn’t quite grasp it all, but as an amateur will watch it again.
Thanks for watching! There is a lot going on in the code here.
I got my Pico W a couple of weeks ago and I finally have some time to play with it. I'm not sure what project I will do with it first, but I'm thinking a binary clock might be fun. Anyway, another fine video. Thank you!
Fantastic demo. Really sticks the point and keeps things simple, but understandable and with all the detail a person would need to do lots of variations on this great project.
Note though: you appear to be relying on the wifi connection receiving the same IP address you got when you were tethering the board. It's true that this is very likely with most home use wifi routers, but certainly not guaranteed. A more robust project (i.e. not just a demo) would probably implement discovery features, like maybe adding NetBIOS support or some other name service, or a broadcast query/response protocol, or something like that.
For the purposes of this demo, a couple of possible suggestions: the most straightforward is to just remind users that if they don't see the board at the IP address they expected, check the client list of their wifi router. For extra credit, while you're adding a status LED to the board, also add a small dot-matrix display that will show the IP address (or maybe just use that display as the status also :) ).
As you say, this is a demo about keeping things simple. As I recall, I do mention the IP issue in the video! :)
Great review/test as always 👍 😀
Great "getting started" video.
Thanks for sharing your expirence with all of us 👍 😀
Thanks 👍
thank you Carlos Balá for all your knowledge
Thank you for another inspirational video .
I love the idea of a weather station... but coding is a bit above my "pay grade"... Great video Sir.. Wish I could have watched every last step of this in real time to learn more. You make awesome tech videos Sir!!
Brilliant, as always an excellent clear instructional video and as I have a Pico W and a BME280 I will try it out ! Thankyou
How do you just have a BME280 lying around?
@@Jimmy_Jones oh, easy, I already have a modest weather station running on a Pi zero and I have a second BME280 which I have tried on a Pico and an Adafruit Feather RP2040. So a Pico W is but a small step.
Wonderful video. And perfect timing (for me anyway). I had just turned on CZcams to look for a video on how to set up a Pico and Thonny. I decided that I'd watch your weekly video before searching for the video I wanted. And what do you know? Your video was on the topic I needed. Thanks! (PS: I joined your channel. I hope it helps.)
Thanks for this, and for becoming a channel member. It certainly helps, and I hope that you have found the member only video and other content in the Community Tab: czcams.com/users/explainingcomputerscommunity
@@ExplainingComputers Thanks.
Sir Chris, another highly useful and educational video! 👍👍
Greetings Don. :)
Thanks for this! Will make this next week
Good luck! :)
Another step is the right direction! Gracias🙏🏼
I'll need to add a rain sensor for my Welsh version, so I know when it's not raining 😀
Mais oui, mon brave.
Great video! Super clear and encouraging
Brilliant video Chris! Broken down excellently as usual.
Any chance of doing a video on using this hardware with weather station software or with a program to display graphs and historical data? That would be perfect!
Keep up the good work on your awesome channel :)
Thanks Graham -- I may well continue this project. :)
Really awesome explanation.... thanks a lot!
Really a nice video pal sorry for being a bit late quality stuff as ever 10/10 and love Pico so versatile.
Love this, would also be interested in more videos on distributed sensors for collecting data.
Hello, Chris.
It is always nice to find a new EC drop.
These videos are pure gold - thank you so much.
You're very welcome!