[Solved] Shields Stackability to create a game controller

Hi,
I would like to build a game controller with motion controls using these three components:

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.

Shields always tend to produce incompatibilities in hardware, as you already found out. The use of timers in libraries is the software equivalent of such problems.

Find out yourself, with data sheets and sample code for all shields, whether and which pin assignments cause trouble, and whether the problems can be cured by jumper settings on some shield.

I started this project, but I used the old version of the Motion Shield which does not require the above procedure to work with the Leonardo. I had some compatibility problems with three buttons of the Gamepad Shield, associated to the pins 2, 3, 4, that made the Motion Shield stop working when pressed because there is a conflict with the use of these pins.

I solved in this way: I bent the pins 2, 3, 4 of the Gamepad Shield and I used three wires to redirect the corresponding signals to the pins 9, 10, 11, as shown in the picture attached. Obviously the pins in the code have to be updated as well.

I hope my experience can be useful to someone.