Arduino: code for OLED W click

Teodor Costachioiu
Aug 10, 2016 · 1 min read
Image for post
Image for post

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.

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

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:

Originally published at on August 10, 2016. Moved to Medium on May 5, 2020


DIY electronics projects and more

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store