Using two shields together


I plan on buying and setting up an Arduino Ethernet, a Gamedunio and an Input Shield together, however since the Ardunio only has a small number of input pins, I am concerned the three items won't work together.

Could someone please tell me if these will work together, and if not how I can make them work or where I can find alternatives to the above items?



P.S.: Apologies if this is in the wrong forum, I wasn't entirely sure where I should post this.

The Ethernet and Gameduino both use SPI. While it is possible to use multiple devices on the same SPI bus each one needs its own Chip Select signal. You may need to do some hacking around hardware wise to re-route different pins to use as the CS pins for the different modules.

Then there's the libraries.

Seldom do people write libraries that use SPI that are friendly towards each other. Getting the software to work with those two might be a bit of a mare.

The input shield is just buttons and pots attached to digital and analog inputs, so should work fine with the others.

Hi theg,

I did not use an Arduino Ethernet, but I recently used a close configuration. I pluged a Ethernet shield and a Gameduino shied on an Arduino Mega 1280, and both shields work very fine together.

I assume that in your and my case, the SPI bus handling is the same. The SPI bus is shared by the Ethernet W5100 chip, the SD card chip and the Gameduino chip. Your application has just to handle their selection when needed through different CS (chip select) pins:

#define ETHERNETSHIELD_SDCARD_CS  4  // CS of the SD card chip
#define ETHERNETSHIELD_W5100_CS  10  // CS of the Wiznet W5100 ethernet chip
#define GAMEDUINO_CS  9  // CS of the Gameduino chip

The CS enabling or disabling is already handled by the Gameduino library, but doesn't seem handled by the Arduino Ethernet library (I did not have time to check directly in the library) In my case I had to enable the Gameduino CS before the Ethernet connection and to disable it after the Ethernet disconnection. Here is the simple code sample to select the Ethernet chip:

digitalWrite(ETHERNETSHIELD_W5100_CS, LOW); // select the Wiznet W5100 ethernet chip

WARNING For non Arduino Ethernet users, the Ethernet shield using the ICSP header, it must be the bottom shield in the Arduino shield stack For Arduino Mega 1280 users, the SPI connection is specific: See

I hope this could help you. Franck Durand