![]() You can also directly download it in zip format and unzip it. You will need git on your Raspberry Pi of course! Use the following to install git if required: $ sudo apt-get install git You can clone it to your Raspberry Pi using the following command: $ git clone Grab the weather station demo code from the ProtoStax GitHub repository. Read the PyOWM documentation to know more and to see their examples. You can install that version by adding =2.10.0 to the package name in the command below (it has already been added for you)] $ sudo pip3 install pyowm =2.10.0 For this tutorial to work, we'll stick to the version 2.10.0. To install PyOWM on your Raspberry Pi, do the following: This is what I went with! Thanks to Claudio Sparpaglione for the PyOWM library! You can very quickly make calls to the OWM APIs and consume the data easily using a more object-oriented approach. Or alternately, you can use the PyOWM library - it is an elegant client Python wrapper for the OpenWeatherMap web APIs. You can choose to make calls to the Open Weather Map REST APIs and process the JSON object that it returns to extract the fields of choice directly. Next, we will need to install the necessary software packages ![]() See steps below in the slideshow - the caption for each image is numbered and gives additional explanation for each step. Mount the Raspberry Pi to the base plate, and add feet and other hardware to prepare the enclosure in Platform Configuration. ![]() ![]() When you are ready to close it up, It is easy to add the side walls and top plate and secure everything with screws. This gives it protection while offering full open access to it to configure and setup the RPi and play around with it. Let us first mount the Raspberry Pi to the enclosure's base plate. Step 1 - Mount the Raspberry Pi B+ to the Enclosure Base Plate You can, of course, use any Raspberry Pi, compatible ePaper display or enclosure and just use the code in this project. It is clear and sturdy and also has rubber feet to slightly elevate it and protect the surface of your table or nightstand, so you can display your weather station and have it easily accessible by your nightstand or coffee table to get the weather information to plan your day! □ In this example I use ProtoStax for Raspberry Pi B+, a clear acrylic enclosure for the Raspberry Pi B+ that is also stackable and modular and has room comfortably for the ePaper Display HAT. It was a personal itch that I had to scratch - I wanted an enclosure that supported different stages of prototyping, offering protection and open access when starting out, with the ability to add side walls and the top later, but also have the ability to stack multiple units either side-by-side or one on top of the other, thereby having the ability to expand with prototyping needs and the addition of other boards and components. Some of you may be aware that I've created a new stackable, modular enclosure system called ProtoStax. It even has a Python wrapper library available to easily invoke the APIs and get the weather data in an object oriented manner, without worrying about underlying protocols and processing JSON results.įor the ePaper display, I use an ePaper HAT for the Raspberry Pi by Waveshare, who also provide a python library for interfacing with it. In this article, I explain how to build a weather station with an ePaper display (like the kind you find on a Kindle, except this one is tri-color - white, black and red) and a Raspberry Pi and put it in an enclosure so that you have a finished project that you can display on your coffee table or night stand and see the weather information for your location (or locations) of choice!įor the weather data, I use Open Weather Map, a cloud service that offers a Weather API and that has a free tier plan available.
0 Comments
Leave a Reply. |