This project displays real-time system stats (IP address, CPU load, temperature, memory usage, and disk usage) on a small I²C OLED screen (SH1106 or SSD1306) connected to a Raspberry Pi.
Perfect for Pi servers, dashboards, or headless monitoring setups.
Run this in your terminal to install everything automatically:
wget "https://raw.githubusercontent.com/honeer/RaspberryPi-OLED/refs/heads/main/setup_oled.sh?raw=True" -O setup_oled.sh
chmod +x setup_oled.sh
./setup_oled.sh
The installer will:
- Update your system
- Install Python & dependencies
- Create a virtual environment
- Prompt you to choose the OLED type (SH1106 or SSD1306)
- Check for a connected OLED display
- Autostart the correct display script on boot
- Show a test preview
If you prefer to install everything step-by-step:
sudo apt-get update
sudo apt-get -y upgrade
sudo reboot
sudo apt-get install python3-pip
sudo apt install --upgrade python3-setuptools
sudo apt install python3-venv
python3 -m venv stats_env --system-site-packages
source stats_env/bin/activate
pip install --upgrade adafruit_blinka
pip install luma.oled
sudo apt-get install python3-pil libjpeg-dev libfreetype6-dev python3-dev i2c-tools
deactivate
sudo apt-get install git
git clone https://github.com/honeer/RaspberryPi-OLED
cd RaspberryPi-OLED
source ../stats_env/bin/activate
python3 display-sh1106.py # for SH1106
# OR
python3 display-ssd1306.py # for SSD1306
Replace YOUR_PI_NAME
with your Pi username (usually pi
):
(crontab -l 2>/dev/null; echo "@reboot /home/YOUR_PI_NAME/stats_env/bin/python3 /home/YOUR_PI_NAME/RaspberryPi-OLED/display-sh1106.py &") | crontab -
OLED → Raspberry Pi GPIO
─────── ─────────────────────
GND → GND (Pin 6)
VCC → 3.3V (Pin 1 or 17)
SCL → SCL (Pin 5 / GPIO3)
SDA → SDA (Pin 3 / GPIO2)
Enable I²C interface if not already:
sudo raspi-config nonint do_i2c 0
sudo reboot
- SH1106 (128x64)
- SSD1306 (128x64)
IP: 192.168.1.101
CPU: 0.14 LA 55.2°C
Mem: 0.6/0.9GB 70.2%
Disk: 6/15GB 40%
- Raspberry Pi 5
MIT License
Original code by:
Built using: