# Multiple OLED screens

**URL:** <https://forum.xod.io/t/multiple-oled-screens/4125>\
**Category:** Hardware Interfacing Questions\
**Created:** [June 17, 2020, 5:57pm UTC](https://forum.xod.io/t/multiple-oled-screens/4125 "2020-06-17T17:57:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbollenb3](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@tbollenb3](https://forum.xod.io/u/tbollenb3)\
**Post date:** [June 17, 2020, 5:57pm UTC](https://forum.xod.io/t/multiple-oled-screens/4125/1 "2020-06-17T17:57:32Z")

</div>

Hi all,  
Im fairly new to XOD and I was wondering how I can hook up multiple OLED screens to my I2C. I’m making 2 gauges with different numbers and text however I do not understand how to display different things on them. I have one going to the bus but I cant add a second on a different address?  
Any help would be much appreciated.  
Thanks!

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/2/21359b32a7cccafcbea9515a1209949f95470f5b.png)

---

<div class="post-metadata">

**Author:** ![chris-cross](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@chris-cross](https://forum.xod.io/u/chris-cross)\
**Post date:** [June 17, 2020, 7:21pm UTC](https://forum.xod.io/t/multiple-oled-screens/4125/2 "2020-06-17T19:21:03Z")

</div>

Hello tbollenb3,  
maybe it could work if you use seperate bus names for your i2c.  
Like I2C1 and I2C2 or som else.

 ![2020-06-17 21_20_25-Window](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/0/0e5c69a0e234183d1ca4999bb57fd23be3f934c8.png)

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [June 17, 2020, 7:26pm UTC](https://forum.xod.io/t/multiple-oled-screens/4125/3 "2020-06-17T19:26:02Z")

</div>

Basically what chris-cross said. You created 2 oled-i2c devices, but you are only using one of them. If you label your to/from-bus nodes & create a 2nd bus for the 2nd display, it should work.

---

<div class="post-metadata">

**Author:** ![tbollenb3](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@tbollenb3](https://forum.xod.io/u/tbollenb3)\
**Post date:** [June 17, 2020, 7:56pm UTC](https://forum.xod.io/t/multiple-oled-screens/4125/4 "2020-06-17T19:56:49Z")

</div>

Hm okay so that worked more or less. It isn’t fighting in the code however they are both still displaying the same message in on the screens. Is it that need to physically change the address of the screen to tell them apart?  
EDIT: I also Tried changing the address on the node its self and it didn’t change anything…

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/3/31536b68f0f13d49e71b5c938c340088e26a1927.png)

---

<div class="post-metadata">

**Author:** ![gabbapeople](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/gabbapeople/32/1517_2.png) [@gabbapeople](https://forum.xod.io/u/gabbapeople)\
**Post date:** [June 17, 2020, 9:24pm UTC](https://forum.xod.io/t/multiple-oled-screens/4125/5 "2020-06-17T21:24:27Z")

</div>

@tbollenb3 Have you tried XOD graphics library?

Also, please note, each ssd1306 display require 1KB RAM. So you cant run 2 displays for example on UNO, Micro, Nano, etc

[https://xod.io/docs/guide/graphics-library/](https://xod.io/docs/guide/graphics-library/)

> **[SSD1306 display](https://xod.io/docs/guide/ssd1306-display/)**
>
> How to work with SSD1306 displays in the XOD programming language.

---

<div class="post-metadata">

**Author:** ![wayland](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/wayland/32/1590_2.png) [@wayland](https://forum.xod.io/u/wayland)\
**Post date:** [June 17, 2020, 10:28pm UTC](https://forum.xod.io/t/multiple-oled-screens/4125/6 "2020-06-17T22:28:30Z")

</div>

@tbollenb3 I’d also recommend the XOD graphics library. Whichever library you use, your OLEDs will need different I2C addresses. SSD1306 displays often have jumpers on the reverse for changing the I2C address. Alternatively you could use an I2C multiplexer:

> [@TCA9548A - 7ch i2C expander](https://forum.xod.io/t/tca9548a-7ch-i2c-expander/2931/2):
>
> Looking at this example you don’t actually need a node / library. you could try to use the standard i2c nodes (begin-transmission + write-byte) to send the signals you require to toggle the outputs. Give it a go, good luck.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [June 18, 2020, 12:07am UTC](https://forum.xod.io/t/multiple-oled-screens/4125/7 "2020-06-18T00:07:04Z")

</div>

As a simple alternative, you can use a 4052b, since using only 2 devices you can control them with A, and the i2c signals in X - Y

 ![suiche-y-multiplexor-analogo-4052b](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/7/767fac1df025dcb842816434590bf5d6d1b8944e.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [June 20, 2020, 12:07am UTC](https://forum.xod.io/t/multiple-oled-screens/4125/8 "2020-06-20T00:07:06Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
