# Issue adding buttons in addition to a matrix display?

**URL:** <https://rpi-rgb-led-matrix.discourse.group/t/issue-adding-buttons-in-addition-to-a-matrix-display/552>\
**Category:** Uncategorized\
**Created:** [July 25, 2022, 12:21am UTC](https://rpi-rgb-led-matrix.discourse.group/t/issue-adding-buttons-in-addition-to-a-matrix-display/552 "2022-07-25T00:21:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JeremiahDuane](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@JeremiahDuane](https://rpi-rgb-led-matrix.discourse.group/u/JeremiahDuane)\
**Post date:** [July 25, 2022, 12:21am UTC](https://rpi-rgb-led-matrix.discourse.group/t/issue-adding-buttons-in-addition-to-a-matrix-display/552/1 "2022-07-25T00:21:01Z")

</div>

I am having difficulty adding GpIO push buttons in addition to a matrix. I have a Raspberry Pi 4 with an Adafruit Hat so I have plenty of pins open. However, when I wire up a button to any of the GPIO buttons I get this warning:

RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings

…and the button doesn’t work. If I start up a file that does not reference the matrix, it all works flawlessly.

Whyis this? Should I not be using RPi.GPIO as an additional import? Do I have to reference something else?

More thorough question here: [pi 4 - RGB Matrix interfering with GPIO button - Raspberry Pi Stack Exchange](https://raspberrypi.stackexchange.com/questions/138445/rgb-matrix-interfering-with-gpio-button)

---

<div class="post-metadata">

**Author:** ![ccoenen](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@ccoenen](https://rpi-rgb-led-matrix.discourse.group/u/ccoenen)\
**Post date:** [July 31, 2022, 6:43am UTC](https://rpi-rgb-led-matrix.discourse.group/t/issue-adding-buttons-in-addition-to-a-matrix-display/552/2 "2022-07-31T06:43:01Z")

</div>

I’m using the image-viewer and Video-Viewer and some of the demos on my matrix, and I added Buttons to the GPIO 16, 20 and 21. They are used in different processes (and totally distinct languages) and so far it seems to work fine. Maybe this gives you some idea?

Here’s where I instantiate:

> **[led-matrix-manager](https://codeberg.org/ccoenen/led-matrix-manager/src/branch/main/index.js#L27)**
>
> Manage a HUB75 LED-Matrix from any web browser.

And this is my Button class:

> **[led-matrix-manager](https://codeberg.org/ccoenen/led-matrix-manager/src/branch/main/lib/Button.js)**
>
> Manage a HUB75 LED-Matrix from any web browser.

I’m using the [Pigpio npm module](https://www.npmjs.com/package/pigpio), it was the only npm module that would let me configure Pull-Up resistors and work in an Event-Style way.

---

<div class="post-metadata">

**Author:** ![ccoenen](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@ccoenen](https://rpi-rgb-led-matrix.discourse.group/u/ccoenen)\
**Post date:** [July 31, 2022, 6:55am UTC](https://rpi-rgb-led-matrix.discourse.group/t/issue-adding-buttons-in-addition-to-a-matrix-display/552/3 "2022-07-31T06:55:14Z")

</div>

Another quick check: do you run your script as root? Or does your user have the gpio group? (It should be a different error message if that’s the problem, but worth checking anyway.)
