Skip to content

Humidity and temperature measuring using DHT22/AM2302 sensor and SSD1306 based display with Raspberrry Pi

License

Notifications You must be signed in to change notification settings

kaulketh/hum-temp-oled

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hum-temp-oled

required package installation flow

sudo apt-get install python-dev python-pip libfreetype6-dev libjpeg8-dev libsdl1.2-dev

sudo pip3 install --upgrade luma.oled

sudo pip3 install adafruit-circuitpython-dht

sudo pip3 install adafruit-circuitpython-lis3dh

sudo apt install libgpiod2

sources, helpful links, useful hints

Run on boot as service

A possibility to enable run at bootup is to use the systemd files.

systemd provides a standard process for controlling what programs run when a Linux system boots up. Note that systemd is available only from the Jessie versions of Raspbian OS.

Create A Unit File

sudo nano /lib/systemd/system/oled.service

[Unit]
Description = Oled Display service
After = multi-user.target

[Service]
Type = idle
ExecStart = /usr/bin/python3 /home/pi/oled/oled.py

[Install]
WantedBy = multi-user.target

sudo chmod 644 /lib/systemd/system/oled.service

Configure systemd

sudo systemctl daemon-reload

sudo systemctl enable oled.service

sudo reboot

Releases

No releases published

Packages

No packages published

Languages