Hi,
I would like to build a game controller with motion controls using these three components:
- an Arduino Leonardo (Arduino Leonardo with Headers — Arduino Official Store);
- a 9 Axes Motion Shield (the new model) (Arduino 9 Axis Motion Shield — Arduino Official Store);
- a Gamepad Shield (Amazon.com).
I would use the Arduino Joystick Library: GitHub - MHeironimus/ArduinoJoystickLibrary: An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support. .
Is it possible to stack these three components (the Leonardo at the bottom, the Motion Shield in the middle and the Gamepad Shield on top) to have the inputs (inclinations and movements) given by the Motion Shield and the inputs (buttons and thumbstick) given by the Gamepad Shield or there are some compatibility problems?
Additional information:
- The Gamepad Shield uses the digital pins from 2 to 8 and the analogical pins A0 and A1 for the inputs.
- The new version of the 9 Axes Motion Shield has the interrupt connected to pin 2.
- The Arduino Leonardo uses pins 2 (SDA) and 3 (SCL) for I2C communication.
- The new version of the Motion Shield requires this gimmick in order to work with the Arduino Leonardo: bend and open the pin on the shield (so that it is not in contact with the Leonardo) and wire pin 2 to pin 1 on the 9 Axes Motion Shield.