python script for my dht22 sensor
- Sensor class
- ORM with peewee
- failure log
In this project I'm using a new ORM lib called peewee.
It's lighter than SQLAlchemy.
Install packages
sudo apt-get install mysql-server mysql-client php5-mysql libmysqlclient-dev
pip install MySQL-python peewee
Now you can import the peewee lib in your python project.
I'm using a Type: Pi 2, Revision: 01, Memory: 1024MB, Maker: Sony and a 100k Ohm resistor.
Breadboard connection:
Install packages
sudo apt-get install build-essential python-dev python-openssl git
Get Adafruit lib from github
git clone https://github.com/adafruit/Adafruit_Python_DHT.git && cd Adafruit_Python_DHT
sudo python setup.py install
Test your sensor
cd examples
sudo ./AdafruitDHT.py 22 4