Weekend Project: Raspberry Pi Weather Station

Weekend Project: Raspberry Pi Weather Station

Hi, this is Wayne again with a topic “Weekend Project: Raspberry Pi Weather Station”.
Welcome back to the workshop, i’m tyler and today we’re going to build an internet connected weather station using a raspberry pi and the pi sense hat. The pie hat was designed for school children to code and create experiments that could be sent into space and used by astronauts on the international space station. It stacks right, on top of any raspberry pi, to extend its capabilities with temperature humidity and pressure sensors, as well as an accelerometer gyroscope and magnetometer. There’S an eight by eight pixel display for immediate output and a five-way joystick for quick inputs for this project, we’ll be using the first three sensors to measure temperature humidity and barometric pressure, the application uploads measurements to weather underground.

So you can track the data with your own online weather station. The data also becomes part of the aggregate weather data for your region, which means that you’re also doing citizen science you’ll start by creating an account with weather, underground and setting up your weather station. It’S free and easy to do then go back to the pwsn homepage and click the mypws button in the upper right.

Once you complete, the setup, weather underground will generate a station id and an access key you’ll need to access the service be sure to copy these values. You’Ll need them to configure the project application later assembly is really easy. Install the heatsinks that come with the zebra case, they’re necessary to separate heat from the temperature sensors just mount the sand hat on top of the raspberry pi. The zebra case is a little fiddly, but it’s a great looking and durable enclosure that should give your pie some reasonable protection from the elements while still having all the proper porting for the pi sense hat sensors before you tighten the case, screws be sure to look Around on all sides to make sure everything is fitting.

Snugly now we’ll set up our software grab an sd card and burn an image of raspbian onto it. Once that’s completed, insert the sd card into the pi turn on your monitor and power up the pi. Now you’ll configure some system wide settings on the raspberry pi in raspi config. You can set a system name for your pi, configure your keyboard and layout and time zone and expand the usable storage on your sd card restart and give the pi the full upgrade treatment. Now download the software for the sense hat and create a folder for the weather station, download the software using wget and then extract the archive open the config.py script. Using any text editor and use the station id values you recorded from weather underground earlier, save that and open the weather station python script.

Weekend Project: Raspberry Pi Weather Station

There’S two settings in there that you can modify to your liking, the interval in which it uploads the data and a toggle to turn the upload off. If you’re still testing run the weather station script and verify that it’s all working, you should see this output if it is with everything set up, set the script to run automatically as soon as the pi boots. The zebra case isn’t weatherproof, so you can either mount it somewhere. There’S a roof overhead or build an enclosure for it power it up and let it start collecting data and keep up to date with it on your own personal weather station on weather, underground. You .