Go Down

Topic: multiple serial oled arduino uno (Read 753 times) previous topic - next topic

kanurys

How would one connect 3 glo-416y oled's to a single uno and control them individually?

MarkT

Since they take serial data, using a fresh instance of SoftwareSerial for each display using a different TX pin in each case?
[ I won't respond to messages, use the forum please ]

kanurys

That's kind of what I was thinking. I've never tried more than one RX/TX serial connection on an uno before, so I was looking for a little advice. Can I assign any pins as SoftwareSerial RX and TX or am I limited to only a few? Analog pins or digital pins? I also want to have computer connectivity via usb

(sorry, I'm a noob at this stuff, coming from the analog world)

Would it look like this?
code:

SoftwareSerial oled1(2, 3);
SoftwareSerial oled2(4, 5);
SoftwareSerial oled3(6, 7);

void setup(){

Serial.begin(9600);

oled2.begin(9600);
oled2.begin(9600);
oled2.begin(9600);

}


void loop(){

Serial.println("hi, computer");

oled1.println("Hello, diplay 1");
oled2.println("Hi, display 2");
oled3.println("Hola, display 3");

}

kanurys

Can anyone confirm that I'm on the right track? thanks.

liudr


Can anyone confirm that I'm on the right track? thanks.


That should work. You may also save some pins if you use the same pin for software serial RX, since you don't need RX. The display never talks back.

kanurys

Cool thanks. I'll try sharing the RX pin and see what happens.

Go Up