lasasinbox.blogg.se

Python code for raspberry pi weather display
Python code for raspberry pi weather display





  1. Python code for raspberry pi weather display install#
  2. Python code for raspberry pi weather display update#

The latter reads the values from the DHT22 sensor and serves it to python. You will be using a combination of python and C code.

Python code for raspberry pi weather display install#

It is essential that you install it, otherwise the script does not start at all.īefore testing the script complete the wiring of the station Code for DHT22 This module will take care of saving the data in the database. After that, you can install the module that will take care of saving read information to your database.

Python code for raspberry pi weather display update#

Now you have to update easy_install with easy_install -U distribute. Do that with sudo apt-get install python-setuptools . You will need to install easy_install which will help you install python modules without any problems. To use the python script (which ever sensor you want to be using) you will need to install a few things – apt-get install python python-dev libmariadb-dev build-essential python-openssl. This way you get a nice overview of the temperatures during the day. With setting up a cronjob, this process is repeated every 30 minutes. Afterwards, the temperatures are read and stored in the table named temperatures. In the first run, it creates a new table in the WordPressDB table. Generally speaking, the code works as follows. Both of them store the results in the database in pretty much the same way. Each of those sensors uses different type of python or even C code to get the readings. Which one you decide to use is totally up to you.

python code for raspberry pi weather display python code for raspberry pi weather display

This tutorial covers the software part for each of those pieces of equipment. Your weather station can use two different temperature sensors.







Python code for raspberry pi weather display