11136769_10152642955285518_838817657184417039_n

SH1106 OLEDs

Recently I ordered some OLEDs from ebay. They looked so good that I could not resist but order a whole bunch of them.
Though the second batch came with the SH1106 driver instead of SSD1306.

It took me a while to figure out why they were not working and showing only in the first few rows but the rest was just glitched.

I fugured out they had a different chip, and could not find any libraries that would be as easy to use as the Adafruit SSD1306. So in the end I ended up porting it for the SH1106.

You can find it on the github below, though note that only I2C protocol is implemented.

https://github.com/ghztomash/Adafruit_SH1106

2 comments for “SH1106 OLEDs

  1. December 23, 2015 at 12:01 am

    looks really cool

  2. Gerhard
    April 11, 2016 at 12:23 am

    Hello,
    first I like to Thank you for your work…

    tried to use your Adafruit_SH1106 Library but get this Error:
    may be it works for I2C only ?

    Arduino: 1.6.8 (Windows 7), Board: “Arduino Nano, ATmega328″

    K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.cpp: In member function ‘virtual void Adafruit_SH1106::drawPixel(int16_t, int16_t, uint16_t)':

    K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.cpp:115:14: error: ‘swap’ was not declared in this scope

    swap(x, y);

    ^

    K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.cpp: At global scope:

    K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.cpp:444:6: error: prototype for ‘void Adafruit_SH1106::dim(boolean)’ does not match any in class ‘Adafruit_SH1106′

    void Adafruit_SH1106::dim(boolean dim) {

    ^

    In file included from K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.cpp:30:0:

    K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.h:154:8: error: candidate is: void Adafruit_SH1106::dim(uint8_t)

    void dim(uint8_t contrast);

    ^

    K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.cpp: In member function ‘virtual void Adafruit_SH1106::drawFastHLine(int16_t, int16_t, int16_t, uint16_t)':

    K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.cpp:586:16: error: ‘swap’ was not declared in this scope

    swap(x, y);

    ^

    K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.cpp: In member function ‘virtual void Adafruit_SH1106::drawFastVLine(int16_t, int16_t, int16_t, uint16_t)':

    K:\Arduino_Playground\arduino-1.6.8\libraries\Adafruit_SH1106\Adafruit_SH1106.cpp:654:16: error: ‘swap’ was not declared in this scope

    swap(x, y);

    ^

    exit status 1
    Fehler beim Kompilieren für das Board Arduino Nano.

    Dieser Bericht wäre detaillierter, wenn die Option
    “Ausführliche Ausgabe während der Kompilierung”
    in Datei -> Voreinstellungen aktiviert wäre.

Leave a Reply to Robolink Cancel reply

Your email address will not be published. Required fields are marked *