I would like to share my experiences with SSD1306 oled screen attached to BPI-R2. I ordered from ebay :
Since I2C_SDA0 and I2C SCL0 are used for RTC shield I decided using I2C_SDA1 and I2C_SCL1. They are on PIN 27 and 28 :
After hooked up VCC with 5V, GND, SCL and SDA, started BPI-R2 and added device :
echo ssd1306 0x3C > /sys/class/i2c-adapter/i2c-2/new_device
You might need kernel i2c-dev module(modprobe i2c-dev)!
With pip3 installed following python libraries :
Adafruit-BBIO
Adafruit-GPIO
Adafruit-PureIO
Library Pillow is a basis for displaying something, but I was unable to download it via pip3. Therefore got it from git, and installed it :
python3.7 setup.py install
I got another part from git, this was Adafruit_Python_SSD1306.
I’ve found in the examples directory a script called stats.py and modified it for my taste. What is important, and has to be changed for i2c-2 bus is following :
disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, i2c_bus=2)
Now it displays time, uptime, cpu temp and load, memory usage, disk space. It’s not perfect, and would like to develop.