Driver and Graphics library for MicroOLED 0.66'' (64 x 48 pixel) display with SSD1306 controller. Display can be obtained from Sparkfun or from diverse Chinese sellers (similar displays) via Aliexpress. Display is driven via SPI. The library can be very easily adapted to other OLED displays (up to 128 x 64 pixel) with SSD1306 controller by setting defines and changing controller init commands accordingly.

Dependents:   MicroOLED_Test

Small test-program that briefly shows the basic usage of the library:

#include "mbed.h"
#include "SFE_MicroOLED.h"
DigitalOut myled(LED1);
SPI my_spi(p5, p6, p7);
MicroOLED my_oled(my_spi, p11, p10, p9);
int main() {
    my_oled.init(0, 8000000);
    my_oled.puts("Hello all!");, 31, 16);
    my_oled.line(0, 9, 63, 47);
    my_oled.rectFill(33, 32, 8, 8);
    while(1) {
        myled = 1;
        myled = 0;