Install Recoil Macro on Arduino

Job ID: 40536712

Budget: $10 – $30 USD

I’ve set up an Arduino with a Shield Host 2.0 so it can sit between my gaming mouse and PC, but I’m stuck getting a “0-recoil” macro loaded and running. The sketch I already have compensates for both vertical and horizontal kick, yet I can’t work out the right libraries, pin definitions, or upload steps to make it behave as a true USB host device.

Here’s what I need from you:

• Review the script I’ll send, adapt or refactor it so it compiles cleanly for the Shield Host 2.0 and recognises my mouse.
• Map the recoil toggle to one of the spare mouse buttons (or a simple hotkey) and make sure it turns on-and-off reliably.
• Suggest whether a fixed or easily tweakable version makes more sense; I’m happy to take your advice, but I do want the option to adjust values later if that isn’t too complex.
• Provide a concise step-by-step guide—Arduino IDE settings, required USBHost or HID libraries, and any flashing tips—so I can re-upload or tweak the code on my own.

Acceptance criteria: the sketch uploads without errors, the mouse is detected by the board, and both-axis recoil compensation activates as expected when I test it in-game.

If you’ve worked with Arduino USB host shields or similar mouse macros before, this should be quick; I just need your expertise to bridge the last mile.