ESP8266 + OLED + graphics = frustration

I have decided to make a clock; a┬ásimple one to begin with. I started with an ESP-01, an OLED, and some base code. It was fairly easy┬ábut did the job quite well. It would go out and fetch the time from a NTP (Network Time Protocol) server and display it on an OLED screen 128×64. These screens are cheap on the market and serve well for displaying a few lines of text, sensor readings, and/or graphics. One has to enter in a username and password for the wireless and the display text for the time was static on the screen, something these little displays don’t like. After a few days or couple of weeks there is bound to the burn in on the screen. I thought a poor man’s screen saver is in order.

I don’t have a picture of the ESP-01 all wired up and working, my apologies. It was getting to be a pain programming it overtime I made changes. So for development purposes I moved over to an Aamica NodeMCU dev board. This makes debugging and programming changes much easier (IMHO). And when the project is done I am able to move it over to the ESP-01. The ESP8266 is such a wonderful family of chips to work with.

To deal with wireless I downloaded and added WiFiManager to the sketch. This allows me to bring a wireless device, in this case my clock, to any wireless network and set it up for it. For example, if I bring my clock into work it won’t know which or how to access the network. Not a problem, power up the device, connect to its own AP, open a browser and give it the proper credentials. It is a very nice library to use! I thought when/if I give away a clock it will be easy for the recipient to setup and use in their own space without having to dink with changing code and uploading it.

Now the screen saver. This is straight forward (FAMOUS last words) or at least I thought it would be. After a set amount of time, blank the screen, and draw a graphic, blank the screen and bring up the time. In theory I have it working. My problem is with the graphics. I do know that graphics work and display as seen with my known eyes in the demo, but I wanted something different than a WiFi logo. I thought the Hackaday logo would do nicely.

hackaday logo 128×64

The story on the web is to head over and use either LCD Assistant or BMC-LCD to convert an image into the HEX code that is required. I kid you not when I tell you that I have tried over 26 iterations of file types, sizes, bits, etc. and all of them come up bubkiss.

The best I have been able to achieve is with a crossed line, which still shows some defects.

SIGH – I will not be deterred. Tonight I am off to the forums to see if I can scare up and help from there. I will be sure and update the site if I find out what the magic incantation is or what silly mistake I made.

Leave a Reply

Your email address will not be published. Required fields are marked *