help with shield compatability

i am trying to make an arduino wifi controlled hydroponic feeder, so far i have gone through many of the tutorials on the different shields and understand their workings. but now that i am getting closer to making the prototype(now that i have all the shields that would otherwise be needed) i am left with the simple problem of "can i use all of the shields at the same time?" question.
i could really use some help finding out if what i want to do is even possible with these shields, here is the list of shields and materials:

arduino mega2560

arduino wifi101 shield (for intigration to io.adafruit or other)
[might be able to switch to the esp8266 breakout v2 using a breadboard]

adafruit motor/stepper/servo shield v.2.3 (controlling two 12VDC peristaltic pumps)

osepp sensor shield ( connecting 16 osepp sensors)

now, here is the potential rub that i see:
the wifi101 shield and the adafruit motor/stepper/servo shield both seem to have the
SCL & SDA pins, but i can't verify if both shields "NEED" to use them.
and the osepp sensor shield does not use them, and looking at some of the schematics and pin arangements, seem to indicate that i "MAY" not be able to use them together.

can anyone help with this, it would be greatly welcomed.
thank you for your time.

Please provide all the links and information.

Wifi101 info : Accessories — Arduino Official Store
This shield is compatible with the Mega.

schematic Adafruit shield : Resources | Adafruit Motor Shield V2 | Adafruit Learning System
This shield is compatible with the Mega.

The Wifi shield uses I2C for a security-encryption chip, but there is a level shifter on the board, so it should not interfere with the 5V I2C PWM chip on the Adafruit shield. I assume that they both have different I2C addresses.

This sensor shield ? http://osepp.com/products/shield-arduino-compatible/sensor-shield/
I don't understand the schematic very well. Which pins are going to be used ?

Do you know how the I2C bus works ? Many sensors can connect to the I2C bus. All SDA are connected and all SCL wires are connected. A chip is selected by sending its I2C address over the bus.

my apologies for forgetting to post the information on the shields.
yes, all of those resources are correct for the shields.

and for the osepp sensor shield, i’ll be using the entire top headers, pin0-pin13&A6-7.


if this image doesn’t show up, i’ve added it to the attachments.

the i2c bus (SCL, SDA pins)
are on pins 5&6(header 6) [in the middle] ->A4&A5 [on the lower right analog-in]
do you see a problem with that?

and thank you, no i didn’t know how the i2c bus worked, and that’s why i came to the community for help.
working on each shield and projects for that “one” shield at a time hardly prepares you for stacking those shields to get closer to your finished project.

once again, thank you.

The shield will not connect the I2C bus, since SDA and SCL are not at pin A4 and A5 for the Mega 2560 board.
The are at pin 20 and 21 : Arduino Mega 2560 Rev3 — Arduino Official Store

That is one of the reasons that version 'R3' was introduced. Extra pins were added next to AREF for SDA and SCL, but the sensor shield does have those.

okay, so then technically i should be okay to stack all of the shields since the motor shield and wifi have switching for the i2c and the sensor shield doesn't use those pins, right? it's just a matter of what other pins on the r3 pin arangement (aside from i2c bus) are being used for the wifi, sensors and motors?
i should be all good then , yes?

The wifi shield uses pin 10 for chip-select.
The wifi shield seems to be able to use pin 0 and 1 for RX and TX, but there is a jumper, so I don’t know if they are used. It also uses pin 5,6,7 for button, interrupt and reset.
If you connect a servo motor to the shield, then pin 9 and 10 are used. Since pin 10 is the chip-select for the wifi shield, only one servo motor at pin 9 can be used.

There could be other pins that I have missed.

That means you can use : All the pins on the Mega shield that are not connected to anything, except pin 50,51,52,53 which is the SPI bus.
The sensor shield can use : I2C (but the I2C bus is not at A4 and A5), pin 2,3,4,8,11,12,13,A0,A1,A2,A3.
That means that there are some headers on the sensor shield that can not be used.

Do you really need that sensor shield ?
There are stackable prototyping shields for the Mega board.

many thanks for such a quick reply.
okay, so it can be done but means that there is a lot of pin mapping that i will have to do.
but to answer your question, it really came down to this: it was available and was more simple at the time to get a shield and keep all the components in one place than work with multiple breadboards to hook up 16 sensors, 2 motors and wifi, especially for when i want to place the project in a housing or box. but, no, i guess, using this specific sensor shield is not a necessity.
though now that i think of it, i technically could "master/slave a mega and uno using the i2c bus and just place the sensor shield on the uno since the slaved uno shouldn't be hampered by lack of pins available caused by using the wifi and motor shields.
i realize that this might be over complicating things but it could solve a few problems maybe.

I have a few Arduino as I2C Slave connected to a Mega Master :wink:
For example the VirtualWire/RadioHead receiver likes its own Arduino, so the timer interrupt does not get delayed too much.
The Mega runs a webpage, and if I load the webpage, the Mega collects data via I2C from the Slaves and updates the webpage. That is not very fast, but it was a lot faster that I thought it would be.

It has advantages. I have a Geiger project, and now I can add I2C or VirtualWire to put that on the webpage as well.

For you, a single Mega would probably the best option. If you add the shields, the Mega at the bottom is sticking out. You can attach a small pcb board on that.