pimoroni-pico icon indicating copy to clipboard operation
pimoroni-pico copied to clipboard

Badger 2040 - Click button trigger GPIO

Open thalesfsp opened this issue 3 years ago • 2 comments

I would like to to connect the Badger 2040 to my RPI. Basic idea: Clicking in some Badger 2040 button would trigger an action in the RPI. Is this possible?

thalesfsp avatar Mar 13 '22 08:03 thalesfsp

Using MicroPython I'd hook it up via USB and do this over serial using Python/pyserial - https://pyserial.readthedocs.io/en/latest/pyserial_api.html

You then just need to make pressing a button print something, watch for that over serial and act accordingly.

CircuitPython could pretend to be a keyboard and send whole USB HID macros, but how useful those are depends on what you want to achieve.

Gadgetoid avatar Mar 14 '22 10:03 Gadgetoid

@Gadgetoid Would be possible to connect the badger to a stepper motor driver (GPIO)? Particularly, SPI.

thalesfsp avatar Mar 29 '22 03:03 thalesfsp

Closing this as it looks like the original question was answered, and the follow-up question was raised and answered separately https://github.com/pimoroni/pimoroni-pico/issues/323

ZodiusInfuser avatar Jan 20 '23 16:01 ZodiusInfuser