Page 1 of 1

Two OLED SSD1306 on one ESP8266

Posted: 24 May 2017, 21:55
by themanfrommoon
Hi,

I wanted to use two OLED SSD1306 Display on one ESP8266 with ESPEasy.

For me, I thought this must easily work.
But it does not.

On one OLED Display I changed the adress by soldering on the PCB.
I think this works fine.
When I start the I2C scanner I got following results:

I2C Addresses in use: Supported devices:
----------------------------------------------------------
0x3c PCF8574A OLED
----------------------------------------------------------
0x3d PCF8574A OLED

Then I configurated the two devices and choosed the adresses "3C" for the first display and "3D" for the second display.
I choosed a delay of 10 seconds.

And now the strange thing comes:
One display works fine, but the second display changes between the content of the first display and the second display.
The problem occurs on the display which parameters were changed at last.

I tested it on ESPEasy R147 and ESPEasy_v2.0.0-dev8_normal_4096. The result is: same behavior.
Maybe there is something wrong with my configuration or hardware, or there is a softwarebug.
The problem occurs when using "Display - OLED SSD1306".
The same problem If I use "Display - OLED SSD1306 Framed".

Does anybody else use two OLED displays?

Thanks and best regards,
Chris

Re: Two OLED SSD1306 on one ESP8266

Posted: 24 May 2017, 22:35
by krikk
pretty sure that's it a software bug... i only have tested it with one display (have only this one) :) ...if you have the know how, have a look at the code and try to fix it...

Re: Two OLED SSD1306 on one ESP8266

Posted: 27 May 2017, 21:50
by themanfrommoon
Hi,

thanks for your answer.
I hoped that the developers of ESPEasy are also reading here, do they?
Maybe they can fix it easily.
I'm not very used to do the programming and debugging.

Maybe some can fix it?

Thanks and best regards,
Chris

Re: Two OLED SSD1306 on one ESP8266

Posted: 31 May 2017, 17:21
by costo
I made a setup with a 0.96OLED on adress 3D and a 1.3 OLED on 3C.
I can confirm that ESPEasy cannot work with 2 OLED´s at the same time.
Both displays show exactly the same content.

I did not look in the source of the OLED software but I assume that it was designed this way to work with only one OLED plugin at the same time to preserve the ´precious´ RAM memory.


I also tested a OLED and a LCD together but that presented no problems.

Re: Two OLED SSD1306 on one ESP8266

Posted: 31 May 2017, 19:16
by Shardan
Hello all,

i can confirm that a similliar issue exists with the LCD displays too.
I connected two LCD 2004 displays with different adresses.
Only one works, the other one does not even show the "ESPEasy" message on bootup.
Seems that the system variables i used are shown quickly one after the other so
only the second one is visible at the end.

If i disable one display the other one works fine.

(Tested with 2.0.0-Dev9 and R148).

Regards
Shardan

Re: Two OLED SSD1306 on one ESP8266

Posted: 31 May 2017, 22:14
by krikk
i will have a look at this issue as soon as my second oled display arrived (friday)

Re: Two OLED SSD1306 on one ESP8266

Posted: 05 Jun 2017, 14:07
by Binder
Hi, I'm not a source code writer, just a reader.
As far as I can see in the code it does not differ between the two instances of this plugin.

A http-command to change something directly, would look like this:

http://<ESP IP address>/control?cmd=oled,<row>,<col>,<text>

(found here: https://www.letscontrolit.com/wiki/inde ... LEDDisplay )

How should the command-line differ between the displays? You don't talk to a specific display here.
I would create a second plugin and rename everything that looks like oled to oled2 (or whatever you want). Just a guess.

regards
Binder

Re: Two OLED SSD1306 on one ESP8266

Posted: 12 Jun 2017, 21:39
by themanfrommoon
Hello krikk,
krikk wrote: 31 May 2017, 22:14 i will have a look at this issue as soon as my second oled display arrived (friday)
Did you get your second OLED Display?

Do you have the same behaviour?

Thanks and best regards,
Chris

Re: Two OLED SSD1306 on one ESP8266

Posted: 14 Jun 2017, 21:04
by krikk
i got my second display and did some testing... it's a software problem which i can reproduce, but i did not have the time to fix it until now...

Re: Two OLED SSD1306 on one ESP8266

Posted: 14 Jun 2017, 21:16
by Shardan
As far as I understand the source code of the plugin it will not be too easy to change....
(Well, my programming times are over for decades so I don't understand too much of it :oops: )

Anyways it would be nice to be able to use more then one display.

Regards
Shardan

Re: Two OLED SSD1306 on one ESP8266

Posted: 14 Jun 2017, 21:39
by themanfrommoon
Okay, understand.

So how is the procedure?
Should somebody start an issue and/or a pull request on github? (I have no idea what is correct and how to do this exactly)

Who can fix it?

Thanks and best regards,
Chris

Re: Two OLED SSD1306 on one ESP8266

Posted: 14 Jun 2017, 22:26
by krikk
i have a simple quick fix, which makes 2 displays work, but that fix has the side effect that the screen goes black for a second, every time the screen refreshes... i am not sure if i will pull this, because it better would be a complete rewrite based on the same library which is uses for the framedOLED display..

Re: Two OLED SSD1306 on one ESP8266

Posted: 15 Jun 2017, 09:52
by krikk
if you are able to compile youself you can fetch my draft from my github fork: https://github.com/krikk/ESPEasy ...this one works with 2 oled displays, only thing broken is the oled commands...

Re: Two OLED SSD1306 on one ESP8266

Posted: 15 Jun 2017, 13:01
by Shardan
krikk wrote: 14 Jun 2017, 22:26 i have a simple quick fix, which makes 2 displays work, but that fix has the side effect that the screen goes black for a second, every time the screen refreshes... i am not sure if i will pull this, because it better would be a complete rewrite based on the same library which is uses for the framedOLED display..
+1 for that

It's better to re-develop the display plugins based on one library.

Re: Two OLED SSD1306 on one ESP8266

Posted: 15 Jun 2017, 13:24
by themanfrommoon
+1

Re: Two OLED SSD1306 on one ESP8266

Posted: 16 Oct 2017, 19:38
by Shardan
Anything new with this issue?

I still want to use more then one display..... :oops:

Re: Two OLED SSD1306 on one ESP8266

Posted: 16 Oct 2017, 21:32
by themanfrommoon
I'm also waiting for it :?

Re: Two OLED SSD1306 on one ESP8266

Posted: 01 Dec 2018, 01:27
by ao16
Any news on this?

Here having exactly the same issue as Shardan described at viewtopic.php?p=16423#p16423.
Two LCD2004 via I2C and different adresses, just one works.

How to differentiate between both LCD's through the LCD-command?

regards,

ao16

Re: Two OLED SSD1306 on one ESP8266

Posted: 01 Dec 2018, 08:21
by grovkillen
We're working super hard for a stable and focus 100% on core issues and don't want to introduce new features until then. A stable is out very soon.

Re: Two OLED SSD1306 on one ESP8266

Posted: 01 Dec 2018, 20:02
by ao16
Thanks for this info and promising outlook, grovkillen

Re: Two OLED SSD1306 on one ESP8266

Posted: 01 Dec 2018, 23:22
by budman1758
You can use a workaround. If you use the "framed" OLED and a regular OLED at the same time that works fine. As long a they are on different I2C addresses then it works no problem. Have a couple units doing it for some time now.