ESP8266 and 2 OLED 0,96" displays
Moderators: grovkillen, Stuntteam, TD-er
ESP8266 and 2 OLED 0,96" displays
Hello, I tried to connect a second OLED displays (OLED SSD1306/SH1106 Framed) to my ESP8266. I used also D1 and D2. First I didn't wrote any content in the second. Both are running, but they show the same. Then I wrote in the second in the first line a content. Now this contend is scrolling in the middle of both display and covering the contend of the first. What can I do, to show different contend on both displays. I took the default address.
Thanks and best regards.
Thanks and best regards.
Re: ESP8266 and 2 OLED 0,96" displays
There are a few things to take into account here:
- The second display should either get the alternate I2C address when on the same I2C bus, but not all displays have that exposed/selectable, so in that case both displays could be connected using an I2C multiplexer, like a TCA9548a (plenty available from AliExpress), where each display should be connected to a separate channel. You need an ESPEasy build that includes support for these multiplexers though, may need to build a Custom .bin
- Each display needs their own task, obviously, but also must have a unique name for that task. Then to address each display, the "oledframed" commands should be prefixed with the taskname and a period/dot (.) to explicitly send the command to that display, f.e. "display1.oledframed,..." and "display2.oledframed,...". This "<taskname>.<command>" feature is a core-feature, present in every ESPEasy build.
- The second display should either get the alternate I2C address when on the same I2C bus, but not all displays have that exposed/selectable, so in that case both displays could be connected using an I2C multiplexer, like a TCA9548a (plenty available from AliExpress), where each display should be connected to a separate channel. You need an ESPEasy build that includes support for these multiplexers though, may need to build a Custom .bin
- Each display needs their own task, obviously, but also must have a unique name for that task. Then to address each display, the "oledframed" commands should be prefixed with the taskname and a period/dot (.) to explicitly send the command to that display, f.e. "display1.oledframed,..." and "display2.oledframed,...". This "<taskname>.<command>" feature is a core-feature, present in every ESPEasy build.
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays
Thanks, I ordered the multiplexer. On the hardware page I found this:
"Since build 20110, there is the option of using an I2C multiplexer. This option is not available in all builds, because of the size of the code. It is usually available in the normal, testing and custom builds, but ommitted from minimal, IR and hardware-specific builds."
I use this build: ESP_Easy_mega_20221105_collection_B_ESP8266_4M1M_VCC Nov 5 2022, but were do I find the setting for the multiplexer?
"Since build 20110, there is the option of using an I2C multiplexer. This option is not available in all builds, because of the size of the code. It is usually available in the normal, testing and custom builds, but ommitted from minimal, IR and hardware-specific builds."
I use this build: ESP_Easy_mega_20221105_collection_B_ESP8266_4M1M_VCC Nov 5 2022, but were do I find the setting for the multiplexer?
Re: ESP8266 and 2 OLED 0,96" displays
Where is this documented to be "build 20110" ?
That doesn't make sense as a build nr.
Anyway the Multiplexer is present in the code for quite a long time.
You can find its settings on the Hardware tab in the web interface.
That doesn't make sense as a build nr.
Anyway the Multiplexer is present in the code for quite a long time.
You can find its settings on the Hardware tab in the web interface.
Re: ESP8266 and 2 OLED 0,96" displays
The I2C multiplexer support is not included in the LIMIT_BUILD_SIZE builds, so when using the Collection builds it's not available, for testing you might use a Normal build, that has it included.
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays
Here I found the document:
https://espeasy.readthedocs.io/en/lates ... dware.html
On the hardware tab I do not find the settings? Where do I find what build is "LIMIT_BUILD_SIZE" and what not?
https://espeasy.readthedocs.io/en/lates ... dware.html
On the hardware tab I do not find the settings? Where do I find what build is "LIMIT_BUILD_SIZE" and what not?
- Attachments
-
- Screenshot-10-09-2022_01.09.12.jpg (301.14 KiB) Viewed 8962 times
Re: ESP8266 and 2 OLED 0,96" displays
That's kind of 'internal knowledge' to developers, and not explicitly stated somewhere, but in general, the Minimal and 1MB flash-size, IRext, Collection (ESP8266), Display (ESP8266) and NeoPixel (ESP8266) builds have that set.
I've build a special Collection B for you that has the I2C Multiplexer option enabled: I'll see if it can be made available on all Collection builds by default, as it doesn't seem to add that much to the build sizes.
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays

Re: ESP8266 and 2 OLED 0,96" displays
Hm, I flashed the ESP with your firmware, but in the menu I find no I2C Multiplexer option? Or will it only appear when I connected the multiplexer?
Re: ESP8266 and 2 OLED 0,96" displays
You have to configure it at the Hardware page first (select the TCA9548a on I2C address 0x70), then it will be visible in each I2C Device Configuration page
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays
I looked first at the hardware page, there is no TCA9548a to select?
- Attachments
-
- Screenshot-10-18-2022_06.18.20.jpg (266.52 KiB) Viewed 8936 times
Re: ESP8266 and 2 OLED 0,96" displays
I have installed the .bin file on an ESP8266 before attaching it to the post above, are you sure the right .bin file got installed?
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays
This is the content, I installed the 1. file
- Attachments
-
- Screenshot-10-07-2022_08.07.41.jpg (40.74 KiB) Viewed 8931 times
Re: ESP8266 and 2 OLED 0,96" displays
Re-installed the same file from the archive I attached, this is from the Tools/Info page:
And on the Hardware page I have this:
And on the Hardware page I have this:
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays
I tried it again 2 times, there is still the file from 05.11?
- Attachments
-
- Screenshot-10-49-2022_08.49.35.jpg (98.5 KiB) Viewed 8922 times
-
- Screenshot-10-50-2022_08.50.09.jpg (31.59 KiB) Viewed 8922 times
-
- Screenshot-10-46-2022_08.46.45.jpg (143.74 KiB) Viewed 8922 times
Re: ESP8266 and 2 OLED 0,96" displays
Can you use the Tools/Firmware Update button, then use the Select file (or your local translated text, like Datei wählen ?) and browse to the correct .bin (or .bin.gz, same effect) file, select the file and click the Update Firmware button to install that on the ESP.
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays
I made exactly that what you wrote. The file I use has the correct characteristic (date 10.12.). It seems, that the file will not be written? But there is no error message? After I click Update the Firmware, it needs some minutes and then it starts again.
Re: ESP8266 and 2 OLED 0,96" displays
I took also an other browser, the same result? It is not the first time that I flashed an ESP. 

Re: ESP8266 and 2 OLED 0,96" displays
Can you connect the ESP to a PC via USB and monitor the serial output from some serial terminal software like putty or miniterm? It needs a baudrate of 115200. Then you can see what happens when you install the update, and possibly detect why the update won't stick.
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays
Thanks, I will try it tomorrow and will report.
Re: ESP8266 and 2 OLED 0,96" displays
Sometimes it may help to disable some tasks before updating.
Especially those who may put on extra load on the system.
Also check to see if you might run low on memory before updating?
Especially those who may put on extra load on the system.
Also check to see if you might run low on memory before updating?
Re: ESP8266 and 2 OLED 0,96" displays

Thanks for all!
Re: ESP8266 and 2 OLED 0,96" displays
Can you share what devices/tasks you have configured?
Maybe we should consider to add a feature to disable tasks that cause this kind of issues during OTA updates. (just thinking out loud)
Maybe we should consider to add a feature to disable tasks that cause this kind of issues during OTA updates. (just thinking out loud)
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays
I have already looked at this and it is next to impossible to hook into the update process.
Only thing we can do is perhaps add a single command to disable all tasks in software (not saving the settings).
This way we have it all disabled during update.
Re: ESP8266 and 2 OLED 0,96" displays
When connecting the displays to the multiplexer (each on their separate channel), be aware that while the displays will have pull-up resistors installed, the multiplexer does not have such pull-up resistors installed at the inputs, but these are required for I2C to work properly. Installing 2 4k7 resistors between SDA - VCC and SCL - VCC will fix that.
/Ton (PayPal.me)
Re: ESP8266 and 2 OLED 0,96" displays
It works fine now, thanks again!
- Attachments
-
- tempImageWw7cge.gif (1.61 MiB) Viewed 8751 times
Who is online
Users browsing this forum: No registered users and 14 guests