u/JustOneCube

Arduino Micro as Keyboard for Hotkey Buttons

I’ve been trying to get an Arduino Micro working for Hotkeys in Emulation Station in a Linux Batocera install.

Does anyone know if the Arduino has to use a different library than “keyboard.h” for it to be recognized in EmulationStation inside Batocera? Does it need to have a gamepad or joystick library? I’m thinking that’s the sticking point since it works in Windows and the Linux command line.

reddit.com
u/JustOneCube — 16 days ago

I am trying to get an Arduino Micro setup with dedicated buttons for things like volume up and down, exit, etc. in Batocera for when I build a dedicated cabinet. I've been scouring the Batocera wiki, various google searches, this subreddit, and I am at wits end with trying to get it to work.

I can confirm that pressing the button attached to the Micro works in Windows (shows the + sign in Notepad), it works at the Linux command line on the same PC that Batocera is loaded on (puts a + sign on the command line), but it does nothing in EmulationStation or when emulating a NES in Retroarch within Batocera.

I can plug a regular keyboard into the Batocera machine and it works fine. Both when pressing the hotkey on my controller and + on the keyboard to increase volume. But when I press the hotkey on my controller and the Arduino set to press +, nothing happens.

It has to be something in how EmulationStation and Retroarch do or do not recognize the Arduino. "hotkeygen --list" shows the Arduino as a device when that command is run when EmulationStation is running, but does not show the Arduino when a game is running in the NES emulator under RetroArch.

If you have a link to a guide, or just something to get me to the next step I would greatly appreciate it.

reddit.com
u/JustOneCube — 17 days ago