Skip to content
IOT-MCU edited this page Apr 21, 2019 · 9 revisions

Welcome to the I2C-Pi-OLED wiki!

DESCRIPTION

In this tutorial I’ll explain how I setup my 0.91″ OLED display module using the Pi’s I2C interface. Once setup it is easy to use Python to place text, draw shapes or even display simple images and animations.

Hardware

1.Any Raspberry pi you have
2.I2C Pi OLED

Hardware connection

Just plug your IIC Pi OLED on your pi will ok.

usage

Update Your Pi and Python

sudo apt-get update
sudo apt-get upgrade
and
sudo pip3 install --upgrade setuptools
If above doesn't work try
sudo apt-get install python3-pip

Enable I2C Interface

You can refer here.

Install OLED Python Library

git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
cd Adafruit_Python_SSD1306
sudo python setup.py install

Example Python Scripts

cd examples
In there you should find a number of example scripts such as :

  • animate.py
  • buttons.py
  • image.py
  • shapes.py
  • stats.py
    These examples can be run using:
    python shapes.py