Arduino: code for OLED W click


This is a quick one: a code for using the OLED W click from MikroElektronika on Arduino boards. Of course, as the OLED W click is a 3.3V board, it will work only with those 3.3V Arduinos. I’ve tried it with chipKIT UNO32 and with my Flip & Click and it worked fine.

This blog post is more than two years old.

The code itself is inspired from an XC8 code for PIC16F18855, which can be downloaded from the examples page of MPLAB Xpress IDE. The only thing I did was to change the routines for SPI communication.

The code displays an image for a short period of time, then prints some text.Text positioning is not yet implemented, so it just prints character after character.

The image I used is a 96 x 39 px .png file, which I have converted in C code using the Image2GLCD tool from

Converting images to GLCD code with Image2GLCD

Converting images to GLCD code with Image2GLCD

The settings I used are: LSB to MSB, Top to Bottom, Custom size, 96 x 40. I don’t know why, but when I choose 96 x 39 it prints garbage on the last lines. With 96 x 40 it works just fine.

So, here’s my code:

The main Arduino code is:


This is still a work in progress, so I have to ask: what other features would you like to have implemented? I’m waiting for your comments…




  1. Avatar

    This code worked perfectly on my Arduino but it also worked when I ported it to my STM32F7xx after just changing OLED_Command and OLED_Data functions.

    Great job, keep it up. 🙂

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.