Adding a display to a Keybow 2040

I’ve noticed that there are some additional connectors on the edge of the keybow 2040 PCB. I was wondering if its possible to connect a screen such as this Pico Display Pack - Pimoroni to the Keybow to display information such as key mappings to save me having to remember what each key on each layer does.

I tried searching to see if anyone else has added a screen to a Keybow but my google foo failed me

Can you post an image? The product page does not show anything, but the schematic suggests that there is an I2C-connector. I2C displays are typically small, so it might be hard to show the keymappings, but you could give it a try.

The Pico Display Pack is SPI and I don’t think these pins are available.

There are Solder Pads along the edge of the main board. I don’t see any SPI pins though, i2c and UART. There are some i2c OLED displays that should work. Going with an Adafruit display may make things easier seeing as its Circuit Python not Micro python.

Yes, with I2C you could use one of the cheap SSD1306-oled displays. They are available in different sizes and resolutions, but the best you can get is 128x64. Some more expensive ones give you up to 128x128 and at least grayscale.

The Keybow2040 uses CircuitPython and adding a SSD1306 to an existing CP program is really simple. But as I said: too small to display the complete key-mapping.

Another option: use the UART-pins to connect to a second pico with a larger display. A program has to listen there for the “show keymap xy” command and the second pico could display the key-mapping.

Might” be possible to remap those pins to SPI?

Raspberry Pi Pico GPIO Pinout

No, because SDA, SCL and INT have hard wired pullups. It is a real pity (also on other breakouts) that Pimoroni adds these hardware pullups. In this case, the pullup on GP3 (INT) prevents mapping for three-wire SPI displays.

1 Like

Cheap is good in case I run out of motivation before I run out of inspiration. Small shouldn’t be an issue, even if it just says media or cursors or NUM pad without actually detailing what’s on each key that will be better than nothing.

Anyone know of a previous attempt that has details on the internet that I can use for hints?

This might help.
Overview | Adafruit MacroPad RP2040 | Adafruit Learning System

Adafruit MacroPad RP2040 Starter Kit - 3x4 Keys + Encoder + OLED [ADABOX019 Essentials] : ID 5128 : $49.95 : Adafruit Industries, Unique & fun DIY electronics and kits

I have one of Pimoroni’s RGB Keypads sitting here on my desk. A less expensive version of the keybow. The first one I got had the wrong pull up resistors on the i2c pins. Micro Python was fine, but Circuit Python threw up errors. This one works just fine though.

I’m not doing anything fancy. Just launching Desktop Apps on my Windows PC.

In my repo GitHub - bablokb/circuitpython-examples: Collection of circuitpython programs, examples, templates you will find an example called oled-ssd06-counter. It displays a single label (a counter) on the oled. This can of course be static, which would simplify the code.

could you bitbang by roping in the uart pins?

There are five pins: two UARTs, SCL, SDA and INT. Three of them have pullups. I see no chance for bitbanging.

I asked because I’ve seen reference to having the clock line pulled up as open drain vs the normal push/pull along with chip select, but don’t have enough hardware knowledge to know if that’s feasible with the hardwired pullups.

You are right and I was too fast - researching for something else I found by chance some SPI setups with pullups. This made me wonder and so I did some more research and found this link SPI - when to use pulling resistors? | Microchip and that explains it.

The message is indeed that SPI normally does not use pullups, but depending on the use case it is possible.

We have on the Keybow:

  • UART-TX (GPIO0) → SPI0-RX
  • UART-RX (GPIO1) → CS
  • INT (GPIO3) → SPI0-TX
  • SDA (GPIO4) → SPI0-RX
  • SCL (GPIO5) → CS

For typical SPI displays, RX is unused. So if you have a SPI-display, it might well be worth a try.

So looking at the ada fruit macropad (out of stock :-( ) it appears to use a screen like this one:

which is I2C so should make it easier to connect. It doesn’t list RP2040 support but as it supports i2c and circuit python and the Keybow also has i2c and Circuit python would it be wrong to think it should work?

@bablokb nice, thanks [adds to pool of “things to try soon”]

@cjohnsonuk yup, or if you want to go even simpler this one should be able to use the same display driver (it’s even the same resolution) EDIT: nope different driver/size, see next post

Not exactly, one oled uses the SH1107, the other the SSD1306. But the CP code will only differ in a few lines (import statement, driver object)

@Nox When I click your link it shows as 128x32 resolution rather than 128x64. I had looked at that already but thought that I might start running out of pixels if I want 4 rows of text, one for each row of buttons. Other pages say the ssd1306 driver is different to the sh1307 for the 128x64 (see my link above : Note that you will need new code since the OLED driver is SH1107 not SSD1306.)

Having now seen the adafruit macro pad I’m now also looking at i2c rotary encoders…

good catch and sorry for the bad info, serves me right for skim reading, mea culpa