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