ESP8266 and 2 OLED 0,96" displays

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

ESP8266 and 2 OLED 0,96" displays

#1 Post by bastler11 » 10 Dec 2022, 08:28

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.

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#2 Post by Ath » 10 Dec 2022, 09:46

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.
/Ton (PayPal.me)

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#3 Post by bastler11 » 10 Dec 2022, 12:20

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?

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 and 2 OLED 0,96" displays

#4 Post by TD-er » 10 Dec 2022, 12:34

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.

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#5 Post by Ath » 10 Dec 2022, 12:47

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)

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#6 Post by bastler11 » 10 Dec 2022, 13:12

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?
Attachments
Screenshot-10-09-2022_01.09.12.jpg
Screenshot-10-09-2022_01.09.12.jpg (301.14 KiB) Viewed 4177 times

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#7 Post by Ath » 10 Dec 2022, 13:53

bastler11 wrote: 10 Dec 2022, 13:12 On the hardware tab I do not find the settings? Where do I find what build is "LIMIT_BUILD_SIZE" and what not?
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)

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#8 Post by bastler11 » 10 Dec 2022, 15:07

:) Tanks very much! I will report. The multiplexer should arrive during next week.

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#9 Post by bastler11 » 10 Dec 2022, 16:04

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?

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#10 Post by Ath » 10 Dec 2022, 16:21

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)

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#11 Post by Ath » 10 Dec 2022, 17:15

I have created PR #4413 to enable the I2C Multiplexer in most ESP8266 builds (having 4 MB flash available).
/Ton (PayPal.me)

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#12 Post by bastler11 » 10 Dec 2022, 18:21

I looked first at the hardware page, there is no TCA9548a to select?
Attachments
Screenshot-10-18-2022_06.18.20.jpg
Screenshot-10-18-2022_06.18.20.jpg (266.52 KiB) Viewed 4151 times

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#13 Post by Ath » 10 Dec 2022, 19:30

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)

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#14 Post by bastler11 » 10 Dec 2022, 20:09

This is the content, I installed the 1. file
Attachments
Screenshot-10-07-2022_08.07.41.jpg
Screenshot-10-07-2022_08.07.41.jpg (40.74 KiB) Viewed 4146 times

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#15 Post by Ath » 10 Dec 2022, 20:28

Re-installed the same file from the archive I attached, this is from the Tools/Info page:
Screenshot - 10-12-2022 , 20_24_31.png
Screenshot - 10-12-2022 , 20_24_31.png (18.33 KiB) Viewed 4139 times
And on the Hardware page I have this:
Screenshot - 10-12-2022 , 20_25_45.png
Screenshot - 10-12-2022 , 20_25_45.png (24.6 KiB) Viewed 4139 times
/Ton (PayPal.me)

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#16 Post by bastler11 » 10 Dec 2022, 20:50

I tried it again 2 times, there is still the file from 05.11?
Attachments
Screenshot-10-49-2022_08.49.35.jpg
Screenshot-10-49-2022_08.49.35.jpg (98.5 KiB) Viewed 4137 times
Screenshot-10-50-2022_08.50.09.jpg
Screenshot-10-50-2022_08.50.09.jpg (31.59 KiB) Viewed 4137 times
Screenshot-10-46-2022_08.46.45.jpg
Screenshot-10-46-2022_08.46.45.jpg (143.74 KiB) Viewed 4137 times

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#17 Post by Ath » 10 Dec 2022, 21:06

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)

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#18 Post by bastler11 » 10 Dec 2022, 21:12

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.

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#19 Post by bastler11 » 10 Dec 2022, 21:15

I took also an other browser, the same result? It is not the first time that I flashed an ESP. :(

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#20 Post by Ath » 10 Dec 2022, 21:23

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)

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#21 Post by bastler11 » 10 Dec 2022, 21:25

Thanks, I will try it tomorrow and will report.

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 and 2 OLED 0,96" displays

#22 Post by TD-er » 10 Dec 2022, 23:05

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?

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#23 Post by bastler11 » 11 Dec 2022, 16:57

:) After I disabled all tasks, I could install the modified firmware and now I could see the options for the multiplexe!

Thanks for all!

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#24 Post by Ath » 11 Dec 2022, 17:21

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)
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 and 2 OLED 0,96" displays

#25 Post by TD-er » 11 Dec 2022, 17:32

Ath wrote: 11 Dec 2022, 17:21 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)
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.

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#26 Post by Ath » 11 Dec 2022, 20:29

bastler11 wrote: 11 Dec 2022, 16:57 ... and now I could see the options for the multiplexe!
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)

bastler11
Normal user
Posts: 105
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: ESP8266 and 2 OLED 0,96" displays

#27 Post by bastler11 » 13 Dec 2022, 10:31

It works fine now, thanks again!
Attachments
tempImageWw7cge.gif
tempImageWw7cge.gif (1.61 MiB) Viewed 3966 times

User avatar
Ath
Normal user
Posts: 3517
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 and 2 OLED 0,96" displays

#28 Post by Ath » 13 Dec 2022, 10:45

Great, you're welcome :)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 127 guests