Connecting USB footswitch to Arduino

Hi,

I have a Hotone Ampero Control footswitch, which is able to send MIDI commands over USB and I it's easily recognized by my Mac via USB. So, once the footswitch gets connected to my Mac via USB, each time I push one of the footswitch buttons, the MIDI Monitor of my Mac displays the corresponding MIDI command. So I thought that should work with an Arduino Pro Micro as well, but there must be something that I am still missing. I have written a sketch for the Arduino, which reads incoming MIDI commands via USB using the MIDIUSB library. When I connect the Arduino to my Mac via USB and type a SendMidi command, it's correctly received by the Arduino, which I can check for in the Serial monitor. What doesn't work, however, is a direct connection between the footswitch and the Arduino via USB, but I don't understand why. No matter which button I push on the footswitch, the Arduino doesn't show any reaction. It appears like some kind of handshake procedure is required, but I have no clue how to accomplish that, if it is possible at all. Could please someone point me to the right track here?

I always start with the example sketches for the library needed. Have you done that?

  • The first thing you need to do is read the forum's posting guidelines.

Please read and use How to get the best out of this forum - Projects / General Guidance - Arduino Forum

The Footswitch is a "USB Device", and needs to connect to a "USB Host."
Most Arduino boards can not implement a "USB Host" (they are also USB devices) without additional hardware.

You would probably have an easier time connecting the footswitch to the arduino via the actual MIDI ports. (that still requires some additional hardware between the MIDI port an the Arduino Micro's "Serial1" pins, but it is less complex.)

read the forum's posting guidelines.

Please read and use...

Oh come on. There was sufficient information in the post to tell them why it wasn't working. It was pretty good for a first post.

Thanks a lot for all your comments. I now understand that I would need an Arduino with USB host capability. My Arduino Pro Micro obviously isn't able to operate as USB host. So far, it seems like the Arduino Due and the ESP-32-S2 /S3 are able to do that. I will get one of those and try again.