# Getting serial input on rPi while doing 3 ABCDE chains

**URL:** <https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17>\
**Category:** Uncategorized\
**Created:** [October 23, 2020, 12:12am UTC](https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17 "2020-10-23T00:12:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/marcmerlin/32/40_2.png) [@marcmerlin](https://rpi-rgb-led-matrix.discourse.group/u/marcmerlin)\
**Post date:** [October 23, 2020, 12:12am UTC](https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17/1 "2020-10-23T00:12:51Z")

</div>

@hzeller, I had a look at [https://github.com/hzeller/rpi-rgb-led-matrix/blob/master/adapter/active-3/schematic.pdf](https://github.com/hzeller/rpi-rgb-led-matrix/blob/master/adapter/active-3/schematic.pdf)  
I thought that the RX pin was free for at least sending serial commands to the Pi, but now I see it’s only free if I don’t have an ABCDE panel on chain 3.

Am I reading the schematic correctly that there is effectively no pins free at all if you do ABCDE on 3 chains?  
If so, that’s very bad news from my project that needs to have an ESP32 send commands over a single wire, to the Pi.

Obviously, ABCDE output could be sent to a shift register to free up some pins, but that would mean a board and driver redesign, which doesn’t sound great.  
Is there anything else I can do?

So, I could throw away my $500+ of ABCDE panels, and replace them with ABC panels, if you can even find those on purpose nowadays, but for money reasons, I’d rather avoid this 🙂  
I can also chain my panels so that they only use a single output instead of 3, but now my refresh rate is divided by 3 and looks pretty bad on pictures :-/ (by then, I can also go back to using an ESP32 or teensy4 to drive them with SmartMatrix)

Thanks.

---

<div class="post-metadata">

**Author:** ![marcmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/marcmerlin/32/40_2.png) [@marcmerlin](https://rpi-rgb-led-matrix.discourse.group/u/marcmerlin)\
**Post date:** [October 23, 2020, 6:08pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17/3 "2020-10-23T18:08:36Z")

</div>

Ok, I found a reasonable answer: I can just plug a USB to serial adapter in the rPi, and that will give me 2 extra I/O pins 🙂

---

<div class="post-metadata">

**Author:** ![marcmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/marcmerlin/32/40_2.png) [@marcmerlin](https://rpi-rgb-led-matrix.discourse.group/u/marcmerlin)\
**Post date:** [November 23, 2020, 7:45pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17/4 "2020-11-23T19:45:05Z")

</div>

end result: [https://www.youtube.com/watch?v=bQc7sh-a6hQ](https://www.youtube.com/watch?v=bQc7sh-a6hQ)

---

<div class="post-metadata">

**Author:** ![hzeller](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/hzeller/32/5_2.png) [@hzeller](https://rpi-rgb-led-matrix.discourse.group/u/hzeller)\
**Post date:** [November 24, 2020, 9:34am UTC](https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17/5 "2020-11-24T09:34:13Z")

</div>

Yay for USB 🙂  
Looks like you now have a good set-up for all kinds of amazing animations!

---

<div class="post-metadata">

**Author:** ![marcmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/marcmerlin/32/40_2.png) [@marcmerlin](https://rpi-rgb-led-matrix.discourse.group/u/marcmerlin)\
**Post date:** [November 25, 2020, 4:28am UTC](https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17/6 "2020-11-25T04:28:15Z")

</div>

Yeah, I do. It was kind of stupid of me to discount USB. Basically with USB, rPi has infinite I/O even if you fill all the GPIO pins, which your lib does in 3 channels of ABCDE panels.  
All this time I was turning my nose at those 128x64 ABC panels, but they would have given me 2 IO pins back 🙂

---

<div class="post-metadata">

**Author:** ![BC\_Mike](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@BC\_Mike](https://rpi-rgb-led-matrix.discourse.group/u/BC_Mike)\
**Post date:** [November 25, 2020, 5:36pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17/7 "2020-11-25T17:36:12Z")

</div>

Is is possible to use GPIO 1 and 0 for LED matrix and connect E line there?

---

<div class="post-metadata">

**Author:** ![marcmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/marcmerlin/32/40_2.png) [@marcmerlin](https://rpi-rgb-led-matrix.discourse.group/u/marcmerlin)\
**Post date:** [December 24, 2020, 2:50pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17/9 "2020-12-24T14:50:24Z")

</div>

I’m not entirely sure if more GPIOs can be scrounged from other uses

From [https://github.com/hzeller/rpi-rgb-led-matrix/blob/master/adapter/active-3/schematic.pdf](https://github.com/hzeller/rpi-rgb-led-matrix/blob/master/adapter/active-3/schematic.pdf)  
and [https://www.raspberrypi.org/documentation/usage/gpio/](https://www.raspberrypi.org/documentation/usage/gpio/)

- pin 9 =\> Gnd
- pin 17 =\> 3.3V
- pin 27 =\> GPIO0 (ID\_SD)
- pin 28 =\> GPIO1 (ID\_SC)
- pin 30 =\> Gnd

[https://raspberrypi.stackexchange.com/questions/55300/what-can-i-connect-in-id-sd-and-id-sc-pins](https://raspberrypi.stackexchange.com/questions/55300/what-can-i-connect-in-id-sd-and-id-sc-pins) says you can use those pins  
I guess I could probably hack the code and the traces on my adapter3 board to use those pins and free up RX/TX on the hardware UART.  
I thought about doing softserial on 27/28, but rPi is apparently not realtime enough to do it reliably.

That said, USB just offers infinite serial ports, so that’s a much easier route. I thought have thought of that first.

---

<div class="post-metadata">

**Author:** ![marcmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/marcmerlin/32/40_2.png) [@marcmerlin](https://rpi-rgb-led-matrix.discourse.group/u/marcmerlin)\
**Post date:** [December 24, 2020, 2:52pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/getting-serial-input-on-rpi-while-doing-3-abcde-chains/17/10 "2020-12-24T14:52:18Z")

</div>

This is a demo of the ESP32 talking to rPi over USB serial:

[![](https://global.discourse-cdn.com/free1/uploads/rpi_rgb_led_matrix/original/1X/2fcbc407e8d5f8b8e687aa127ec7f8b5a90f74ca.jpeg "FrameBuffer GFX NeoMatrix FastLED ESP32 vs rPI") ](https://www.youtube.com/watch?v=OIXOEYw8r6E)
