MacroPad as an I2C Slave Device?

The title kinda says it all: I’d like to use its I2C Qwiic connector to wire up a MacroPad to a Raspberry Pi’s I2C bus, using the MacroPad as a slave. It has the potential as a great input device to something, but only if it can be connected to something. Is this possible? Can anyone point me at how to do so?

Thanks very much!

Have you tried setting it up as a USB HID device? It’s doable with Circuit Python and I do believe that’s the Intended use for the Macro Pad.
I have an RGB Keypad setup as USB HID. I use it on my Windows PC to launch programs and Apps, etc.

The MacroPad is implemented with CircuitPython. CP has an “i2ctarget” module. See: i2ctarget – Two wire serial protocol target — Adafruit CircuitPython 9.1.0-beta.0 documentation

Thanks for the suggestion, no, I haven’t. This is on a robot where there’s already a TinyPICO attached to the USB bus, but of course it’s a bus so multiple devices are possible. I generally am using MicroPython rather than CircuitPython but that wouldn’t be a barrier. Do you have a handy reference to how to set up the MacroPad as a HID device, or even a more generic reference? Thanks.

If you go here, Adafruit MacroPad RP2040 Starter Kit - 3x4 Keys + Encoder + OLED [ADABOX019 Essentials] : ID 5128 : Adafruit Industries, Unique & fun DIY electronics and kits
And scroll down to the bottom of the page, there are guides for it listed from their Learn section.
The main one being the following.
Overview | Adafruit MacroPad RP2040 | Adafruit Learning System

All this being said, your setup is a bit unique. @bablokb can likey help you with it better than I can. I’ve only done the simple USB HID keypad stuff with my RGB Keypad.

1 Like

I don’t think HID is what you want (not for the communication Pi->MacroPad). A HID is “human interface device”, i.e. a keyboard. That is the main purpose of the MacroPad: a small and programmable keyboard.

You want to to talk to the MacroPad from the Pi, so the direction is not from MacroPad to Pi (as a keyboard would do), but the other way around.

The only reason I can think of where this makes sense is that you want to dynamically reconfigure the keys from the Pi side. Once configured, the MacroPad would act as a keyboard sending the configured key-sequences back to the Pi. So reading the learning guide as suggested by @alphanumeric is something that you should do anyhow.

2 Likes