SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By belfastrab

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...

I have a 128 x 64 OLED and in the Adafruit SSD1306 library used for driving the OLED there is a logo which is 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] = { and it's closing };

I then tried replacing the hex code that came inbetween

#if (SSD1306_LCDHEIGHT == 64) and it's closing #endif

but 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. No offence meant to Adafruit of course just would like my own.


User avatar
By Ross Robotics
Thanks for putting up a solution. I am sure someone will find it helpful!