This fork mades the library totally platform agnostic : no need to declare the host platform or the I2C bus to use at library build time but you have to pass as an argument the said port (i.e. /dev/i2c-2 on the BananaPI). If your host has more than one I2C bus exposed (like on the BananaPro), you may have several tiny screens without cheating.
I also added some neat functionality (getPixel(), SaveToPBM(), ...) and make the C interface working.
Hardware installation procedure can be found in Hallard's blog. To make and install the library, the procedure is the following :
PREFIX=
where the library will be installed (default /usr/local
)CFLAGS=
to specify compiler option. The default one will rely on build host architecture that may not be suitable for cross or distributed compilation.git clone https://github.com/Speedsaver/ArduiPi_OLED.git && cd ArduiPi_OLED && make
sudo
):
make install
make clean && make
This version has been tested on a BananaPI running Gentoo using an SSD1306 0.96'' screen.
Enjoy !!
Please find bellow comments from previous authors with all my thanks.
The original library has been modified to write to the I2C devices at /dev/i2c-X instead of driving the IO pins directly. Device and address can be set in dev_io.h Not implemented for SPI.
[04/2018] Tested on an Orange Pi Zero H2+ running Armbian (Armbian has something in the boot config called "overlays" which enable IO ports, in this case it was 'i2c0')
Thanks to the original author, what follows is the original README:
This is the port of some of the most used OLED drivers such as the Adafruit, Seeedstudio, Tindie, Generic... to the Raspberry Pi. It can drive OLED with chipset such as SSD1306, SH1106, SSD1327 and SSD1308
This library replace the previous one named ArduiPi_SSD1306
This has been ported to work with the ArduiPi Project but it can work on almost any Raspberry PI.