The ArcadeJoySwitch is a windows tool that takes care of settings the servo positions of your joysticks into the correct position for each game that you start from your frontend. The ArcadeJoySwitch tool has a plugin that is copied into the AttractMode Frontend plugins folder, but it can be used more generic.
The tool gathers all required joystick information from a MAME executable and converts it into a database. The ArcadeJoySwitch AttractMode plugin is executed before a games is started and sends the game name to the executable Main.exe. This executable matches the game name with the database to determine if the games used 4 or 8 way joystick directions. The joystick mode is send via a USB cable to a connected ARDUINO and converted to a led signal and a servo setting.
The software and tutorial videos can be found here:
www.future-eggs.com >> ArcadeJoySwitch
Have a look and let me know what you think.