harvestcore / oled-pi

Using a SH1106 OLED screen on a RPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SH1106 OLED screen setup for RPI

Base install

sudo apt-get update
sudo apt-get upgrade
sudo reboot

sudo apt install python3-pip
sudo pip3 install --upgrade setuptools

Install the Luma libraries

pip3 install luma-core
pip3 install luma-oled

GPIO Connection

  • GND / GND / GPIO 9
  • VDD / VCC / GPIO 1
  • SCK / SCL / GPIO 5
  • SDA / SDA / GPIO 3

Check the I2C status

sudo i2cdetect -y 1

    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Run the script

python3 stats.py

Run on boot

crontab -e

# Add this line to the end of the file.
@reboot python3 /path/to/stats.py &

Icons

Line Awesome

About

Using a SH1106 OLED screen on a RPI


Languages

Language:Python 100.0%