
Reading Data from Weather Sensors with Python
Apart from building a weather station, another thing I had been wanting to do for a long time was to learn Python. With this Weather Station project I satisfied both :-) Check the source code of this project in Codeberg . Learning the Pimoroni's WeatherHAT library The first thing I did, after having everything installed, was to learn how the Pimoroni's WeatherHAT library works in order to: Read the weather data from the sensors Display the weather data in the WeatherHAT's screen So I opened an SSH connection and started playing! Apart from being my first steps with Python what I learned about the library was: It is necessary to call the " update " method of the sensor before getting the weather readings The first reading is "crap", it is necessary to perform an initial update and wait a few seconds before getting good reading values. There are two attributes for temperature: device_temperature and temperature The temperature attribute is calculated by applying a default offset of 7.5ºC
Continue reading on Dev.to Python
Opens in a new tab




