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";
node.send(msg);
msg.payload = "oled,1,1,Weather Report"; // OLED line 1
node.send(msg);
msg.payload = "oled,2,1,Line 2"; // OLED line 2
node.send(msg);
msg.payload = "oled,3,1,Line 3"; // OLED line 1
node.send(msg);
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.
Display - OLED SSD1306 <<< layout problem
Moderators: grovkillen, Stuntteam, TD-er
- dynamicdave
- Normal user
- Posts: 258
- Joined: 30 Jan 2017, 20:25
- Location: Hampshire, UK
Display - OLED SSD1306 <<< layout problem
- Attachments
-
- oled_2.jpg (120.28 KiB) Viewed 7986 times
-
- oled_1.jpg (129.29 KiB) Viewed 7986 times
Re: Display - OLED SSD1306 <<< layout problem
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)
It seems to me that when offset is greater than 1, the buffer should be shortened before written (if possible)
Who is online
Users browsing this forum: No registered users and 8 guests