Adding buttons/encoder to a Plasma2040

Hey everyone, sorry if this is a bit of a dumb question but I’m trying to figure out how to add buttons to a Plasma2040. Ideally computer keyboard style key-switches. I’m hoping to make some desk lighting that I can control from a “macro board” of sorts without needing to touch the built-in board buttons. I’d also like to add an encoder too if that’s possible?

So I guess what I need to ask is, how do I connect things to the Plasma2040? It’s got a few holes on the side but I don’t know what BG means or really much more than the 5V and GND holes. Anyone able to point me in the direction of a learning resource for it?

Thank you!

The BG refers to Breakout Garden. That block of pins are the i2c pins and they are arranged to match the pinout used on the Breakout Garden i2c breakouts.
For example,
RGB Encoder Breakout - Pimoroni

The QWICC connector uses those same pins.

1 Like

The A0, A1, A2 are ADC. SWC and SWD can be used for two added switches, Switch C and Switch D.

1 Like

Just seconding @alphanumeric 's comments. But generally I2C might be easier. There are even I2C button boards. This one might be the cheapest option Adafruit LED Arcade Button 1x4 - STEMMA QT I2C Breakout - STEMMA QT / - Pimoroni

Alterntively you could go with something like this Adafruit AW9523 GPIO Expander and LED Driver Breakout - STEMMA QT / Qw - Pimoroni and wire up your own buttons. There are also a few i2c macro boards out there (or at least a quick google seems to indicate)

@hrrsn Don’t take this the wrong way, but what is your skill level?
Soldering wise, and python wise?
One of these, could likely be used with a Plasma2040 with some custom wiring etc.
Pico RGB Keypad Base - Pimoroni
The button part is via i2c. Replace the Pico with a Pico Proto, then wire up the pins needed to the plasma with wires.
Pico Proto - Pimoroni
You’ll likely be trading nice looking for functional though.

I have several of those RGB Keypads on the go and like them for what I do with them. I use it as a USB Hid device on my windows PC.

Hey gang, sorry about the gap in getting back on this! Life got in the way for a while there.

So, Python wise I know next to none. But I’m a professional developer in several other paradigms so I feel like I can probably figure some of it out.

Soldering wise, I’m very confident soldering, though my knowledge on circuitry is lacking.

Is that helpful @alphanumeric?

What I’m after doesn’t have to be pretty at all, im going create an enclosure for the controller anyway, but I couldn’t figure out how I could add a dial or button that’d be usable in the software to change brightness for instance

1 Like

For brightness-control I would attach a potentiometer to one of A0-A2 pins. This is also very simple to process from python side. LEDs are not linear in response, so you should apply some corrections (but of course, that is the second step after it works).

Hi!

By far the easiest way to do this is with pimoroni’s own IO expander. Gives you 14 inputs for buttons, potentiometers, etc. It’s what’s inside my controller:

https://www.instagram.com/p/CdEHZwXqRvS/?igshid=YmMyMTA2M2Y=

Hope you manage to get this done.

1 Like