Display - OLED SSD1306 <<< layout problem

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
User avatar
Normal user
Posts: 213
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Display - OLED SSD1306 <<< layout problem

#1 Post by dynamicdave » 06 Feb 2020, 07:47

I'm using the ESP-Easy release 20200204 although this problem appears in previous releases.

I'm sending a series of commands (like the following) from Node-RED to a Wemos D1 Mini using MQTT.

msg.payload = "oledcmd,clear";

msg.payload = "oled,1,1,Weather Report"; // OLED line 1

msg.payload = "oled,2,1,Line 2"; // OLED line 2

msg.payload = "oled,3,1,Line 3"; // OLED line 1

They work fine, BUT if I alter the starting column on say line-3, it wipes-out row-1 off by the same amount.

Has anyone else seen this behaviour or is it just me ??

Regards, David.
oled_2.jpg (120.28 KiB) Viewed 3607 times
oled_1.jpg (129.29 KiB) Viewed 3607 times

Normal user
Posts: 80
Joined: 19 Jul 2018, 01:48

Re: Display - OLED SSD1306 <<< layout problem

#2 Post by dampa » 08 Feb 2020, 17:22

The issue is that when you write out data, it looks like it is writing a full 'page' (or line) into the memory buffer. Since a page is 16 bytes, it writes the 16 bytes starting at the offset and this cause the following 'page' of the buffer to be overwritten.

It seems to me that when offset is greater than 1, the buffer should be shortened before written (if possible)

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests