https://github.com/schenkd/dht22
RaspberryPi temp and humidity sensor DHT22
https://github.com/schenkd/dht22
dht dht22 humidity-sensor python raspberry-pi temperature-sensor
Last synced: 11 months ago
JSON representation
RaspberryPi temp and humidity sensor DHT22
- Host: GitHub
- URL: https://github.com/schenkd/dht22
- Owner: schenkd
- Created: 2016-09-21T17:31:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-22T00:02:53.000Z (over 9 years ago)
- Last Synced: 2025-01-03T10:24:41.353Z (about 1 year ago)
- Topics: dht, dht22, humidity-sensor, python, raspberry-pi, temperature-sensor
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DHT22
python script for my dht22 sensor
## coming soon
- [X] Sensor class
- [X] ORM with peewee
- [ ] failure log
## database
In this project I'm using a new ORM lib called peewee.
It's lighter than SQLAlchemy.
### Setup
Install packages
```batch
sudo apt-get install mysql-server mysql-client php5-mysql libmysqlclient-dev
```
```batch
pip install MySQL-python peewee
```
Now you can import the peewee lib in your python project.
## How can I use my sensor on a raspberry pi?
### Hardware
I'm using a Type: Pi 2, Revision: 01, Memory: 1024MB, Maker: Sony and a 100k Ohm resistor.
Breadboard connection:

## Software
Install packages
```batch
sudo apt-get install build-essential python-dev python-openssl git
```
Get Adafruit lib from github
```batch
git clone https://github.com/adafruit/Adafruit_Python_DHT.git && cd Adafruit_Python_DHT
sudo python setup.py install
```
Test your sensor
```batch
cd examples
sudo ./AdafruitDHT.py 22 4
```