Connect with us

Adafruit Oled Driver Library Change Logo

Discussion in 'Microcontrollers, Programming and IoT' started by belfastrab, Jul 10, 2017.

Scroll to continue with content
  1. belfastrab


    Jul 10, 2017

    I am hoping someone can help me as I am pulling my hair out trying to figure this out and have tried following the limited information I can find about this online but like a lot of the information the steps given are not always complete which makes trying to figure something out as a novice really frustrating. Been hours at it so far...

    In the Adafruit SSD1306 library used for driving an OLED there is a logo specified in the Adafruit_SSD1306.cpp file which shows the Adafruit logo on OLED switch on. I have used software to convert a 128 x 64 8 bit bitmap to hex code but no matter where I place it it throws up a error or errors when being verified.

    I have tried every which way such as replacing everything between the following with the generated logo hex code:

    static uint8_t buffer[SSD1306_LCDHEIGHT * SSD1306_LCDWIDTH / 8] = {


    I then tried replacing the hex code that came after

    #if (SSD1306_LCDHEIGHT == 64)b ut it said I had too many characters which was probably true as there was considerably more characters in my logo than what was there in the 64 section.

    Do I need to change anything in this line of code static uint8_t buffer[SSD1306_LCDHEIGHT * SSD1306_LCDWIDTH / 8]?

    I would be most grateful if someone could please tell me exactly where I am meant to place my logo hex code and if I need to change anything else for this to work because as I say I really am brand new to the Arduino and code of any description and trying to learn with practical examples but this bit is really over my head and would love to have my logo rather than Adafruits in my first Arduino project.


  2. JWHassler


    Dec 22, 2014
    It looks like the *.cpp section accepts three different logo-lengths: 16x12 bytes, 16*(12+20) bytes, and 16*(12+20+32 bytes.)
    What is the size of your proposed logo?
    Also, maybe show the errors being generated.
  3. belfastrab


    Jul 10, 2017
    Hi JW

    Thanks for your reply.

    I finally worked it out. The full 64 high logo is sort of like how you think it's split into 3 sections. The first section being 12 lines, the 2nd section is 20 lines and the 3rd section is 32 lines so all together that of course makes 64 lines. So you just copy the first 12 lines from your logo code and paste it in replacing the first section and repeat from the next two sections.

    There is a handful of tutorials or docs online telling people how to do this but they are either entirely wrong or only give 1/2 the information and none of them say about splitting the code and one even actually says to remove the if statements which just breaks the whole thing.

    This was driving me nuts and I must have tried 100 different ways over two long days till I eventually worked it out.

    Hopefully this post will help someone like me out in the future.


  4. belfastrab


    Jul 10, 2017
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day