Overriding Pins used for Keybow mini

Hi, total newbie to all things hardware, but I am familiar with software development. Just got a raspberry pi for xmas and I’m excited to try some projects out!

I’m trying to find out if I can remap the pins used by the Keybow mini. I want to use it in conjunction with another HAT which has some overlapped pins. I took a peek at the GitHub firmware, and noticed some code that looks like it could be modified to use different pins, but I’m not sure if it’s that easy or there’s some sort of hardware limitation that I’m not aware of.

If anyone could shed some light, that would be really appreciated.

The pinout for the keybow mini is here, the pins used are hard wired.
Keybow Mini at Raspberry Pi GPIO Pinout

@alphanumeric Thanks for the reply. I took a look at the pinouts and saw the conflict (I want to use it with the Unicorn hat mini). Since the pins are hardwired, do you think rerouting the pins on a breadboard combined with modifying the code would work? I appreciate the time!

Probabaly? I can’t say for 100%, I don’t have a keybow. The Unicorn Hat Mini has 4 buttons on it, could you use those?

It’ll depend on which pins you want to reroute, button pins will be easy, but the SPI pins will be more difficult and need more code modificaiton.

Damn, both seem to use pin 19 & 23 for SPI. Well, I’ll give it a shot. Thanks for the input!

As a fallback I’ll use the unicorns built in buttons, but realistically they’ll be a pain to use for the final product I’m trying to put together

You can have more than one device on SPI, as long as they use different chip select CE pins on the Pi end.
Or move one to SPI1 and enable SPI1.

Pinout says that SPI on the keybow is used for LEDs, and those tend not to have chip-selects. It might still work, the LEDs will just go nuts when talking to the Unicorn HAT (they may actually just take on the same colours?).

Using SPI1 isn’t that common, but there’s a short explanation here. When setting up the device which uses SPI1 you’ll need to tell it to use the SPI1 interface, I think that should be part of the Python setup.

Yeah, the keybow isn’t using the chip select pin. It might not actually be using SPI, just those pins for data and clock signals to the LED’s

I have three of the 0.96 LCD breakouts running on SPI1. I had to add dtoverlay=spi1-3cs to the config.txt file to enable SPI1
My python setup goes like this. port=0 is SPI0 and port=1 is SPI1

disp0 = ST7735.ST7735(

disp1 = ST7735.ST7735(

disp2 = ST7735.ST7735(

GPIO 7, Pin 26, CE1
GPIO 8, Pin 24, CE0
GPIO 9, Pin 21, MISO
GPIO 10, Pin 19, MOSI
GPIO 11, Pin 23, SCLK

GPIO 16, Pin 36, CE2
GPIO 17, Pin 11, CE1
GPIO 18, Pin 12, CE0
GPIO 19, Pin 35, MISO
GPIO 20, Pin 38, MOSI
GPIO 21, Pin 40, SCLK



dtoverlay=spi1-1cs #1 chip select
dtoverlay=spi1-2cs #2 chip select
dtoverlay=spi1-3cs #3 chip select

SCLK - Serial CLocK
CE - Chip Enable (often called Chip Select)
MOSI - Master Out Slave In
MISO - Master In Slave Out
MOMI - Master Out Master In