Monday, June 20, 2016

Raspberry Pi display on 128x64 I2C OLED with SSD1306, using Python


This post show how to install rm-hull/ssd1306 on Raspberry Pi, and run the example to display on 0.96" 128x64 I2C OLED with SSD1306 driver, using Python.


rm-hull/ssd1306 interfacing OLED matrix displays with the SSD1306 (or SH1106) driver in Python using I2C on the Raspberry Pi.

Before install rm-hull/ssd1306, we have to enable I2C on the Raspberry Pi.

Connect a 0.96" 128x64 I2C OLED to Raspberry Pi 2 as shown:
3V3, GND, SDA and SCL respectively.
(my OLED support both 3.3V and 5V)

Download rm-hull/ssd1306 with:
$ wget https://github.com/rm-hull/ssd1306/archive/master.zip

Install the library, switch to the unpacked download folder:
$ sudo python setup.py install

Install some packages:

$ sudo apt-get install i2c-tools python-smbus python-pip
$ sudo pip install pillow

That's, now you can try the example, refer to the video.


Related:
NodeMCU/ESP8266 + OLED 0.96" 128x64 I2C SSD1306 using esp8266-oled-ssd1306 library

No comments: