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.
Somebody commented with error of:
error in luma.oled setup command : 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
I google to found that it may be because of the version of setuptools.
Install and upgrade setuptools:
$ sudo -H pip install --upgrade pip setuptools
- NodeMCU/ESP8266 + OLED 0.96" 128x64 I2C SSD1306 using esp8266-oled-ssd1306 library
The driver renamed rm-hull/luma.oled, and updated to support SSD1306 / SSD1322 / SSD1325 / SSD1331 / SH1106 OLED.