Arduino: code for OLED W click

Teodor Costachioiu
Aug 10, 2016 · 1 min read

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 http://www.avrportal.com/?page=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:

Originally published at https://electronza.com on August 10, 2016. Moved to Medium on May 5, 2020

Electronza

DIY electronics projects and more

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

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