0

I need for my raspberry a USB connected device like a button that can be color illuminated and can be pressed. I want to use it to trigger at my raspberry certain actions in sw.

I fond this https://www.ultimarc.com/usbbutton/control-interface/usbbutton/ but the SDK is not supporting linux unfortunately. "When pressed, “types” a user-configured sequence of up to 48 keyboard characters into the PC on a single press." This "typing" is in my case not usable, as its a embedded device that needs login first.

I thought I can create a simple polling sw that polls the button state if pressed and sets the LED regarding the pressing, e.g once pressed red, second pressed green, third red, ... Unfortunately the sdk is only for windows..

Does anybody has a suggestion what product I can use instead ?? Or maybe i can use the sdk also for linux somehow?

2
  • this may help linuxjournal.com/article/7353 – jsotola Feb 22 at 20:04
  • Why does it need to be USB-connected? You might have simpler possibilities with a Pi, since it has GPIO, which is optimal for buttons. – PMF Feb 28 at 7:30
0

I've a couple of these gadgets. They identify themselves as HID Keyboards so by default they will sent chars to your computer.

There is no SDK as such for non-windows boxes but its just keypresses at the end of the day. I use libusb to monitor the keypresses for the specific device and then act on them.

Here is a link to a GitHub project which does something similar in Rust I found it very useful as it has examples for setting up the key codes etc. libusb is a known quantity and available for multiple languages so a good starting point.

https://github.com/RobbieClarken/tomatina

1
  • As I said in my Question: I know that some devices has this feature, but I cant use it. Its as with a keyboard, I have to be logged in before I can type commands, and in my case this is not possible."When pressed, “types” a user-configured sequence of up to 48 keyboard characters into the PC on a single press." This "typing" is in my case not usable, as its a embedded device that needs login first. – TrailSurfer Mar 1 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.