This is SSD1306 oled display driver implementation for Arduino. The driver supports i2c and spi displays, and is also capable to work with pcd8544 (nokia 5110) LCD over SPI.
SSD1306 OLED display driver
Introduction
SSD1306 OLED display driver is Arduino style library, intended for use with very small microcontrollers (with a little of SRAM). It was developed to use as few resources as possible. Since ATTiny controllers have no division and multiply operations, the library uses shift operation to speed up calculations.
Key Features
- Embedded i2c software implementation
- Standard i2c support (via Wire library)
- 4-wire spi support (via standard SPI library)
- Usage of very little of SRAM (minimum 26 bytes)
- Usage of as little Flash as possible
- Fast implementation to provide reasonable speed on slow microcontrollers
- Primitive graphics functions (line,rectangle,pixels)
- Printing text to display
- Drawing bitmap images, located in SRAM or Flash memory (PROGMEM)
- Work with sprite objects
- Creating and controlling menu items (see ssd1306_demo example)
- Memory-buffered operations (nano_gfx.h) for flickering-free output.
- Bonus examples:
- Arkanoid game
- Simple Lode runner game
The default i2c pins for embedded implementation can be modified in ssd1306_i2c_conf.h file. For other controllers pins are defined by standard Wire library. The default spi SCLK and MOSI pins are defined by SPI library, and DC, RST, CES pins are configurable through API.
Supported displays:
- i2c ssd1306 128x64 oled display
- i2c ssd1306 128x32 oled display
- spi ssd1306 128x64 oled display
- spi pcd8544 84x48 nokia 5110 led display (experimental support)
Supported platforms
The goals of ssd1306 library
- To use as few RAM as possible
- To use as few Flash as possible
- To be as fast as possible
- To fit Arkanoid game example to Attiny85 microcontroller