R/W int on internalSRAM in a multiple pro mini I2C setup

I've tried to find the answer to this in many guides but cant seem to find it.
And to add to that, I'm very new to all this(electronics and programming).

I want to connect multiple pro minis via I2C and be able to read/write int and bool from the microcontrollers sram.

What I want to be able to do is use for example the temperature reading from one pro mini to control the analog output on another
or/and when a button is pressed on one pro mini, light a led on another pro mini on the IC2 network.
If its as simple as reading any I2C sram, where do I get the IC2address and "memory block/byte address"?

I would also be happy if I could read a value strait from the pin of any pro mini on the I2C network, and write to them as well.

Is any of this possible?

Not only possible, very cool and useful as well.
The disadvantage is that you might have to upload three new sketches when you change something.

Start with these examples:

Nick Gammon wrote a page about I2C. Study the page until you understand it.

Assign the I2C address to the Slaves.
If the Master is always Master, it doesn't need an I2C address.

To simulate a ram, a register address is written and data is read. You have to program that yourself in a sketch of the Slave device. A simple global (volatile) variable could be used as the register address and an array simulates the ram.

That is how I use it. In the Slave, a temperature is read in the background and updated to the simulated ram. The Master requests the data and writes it to a webpage.

There is a bug in the library when using an Arduino as I2C Slave.
A delay of about 10us should be added between endTransmission and requestFrom.
http://forum.arduino.cc/index.php?topic=172296.msg1289545#msg1289545

Thanks for your reply!
Now I know how where the address comes from:

Wire.begin(2);                // join i2c bus with address #2

But still not sure how to request a specific int. You talk about a array for simulated ram, I think I understand what your getting at, but I dont know how to request a specific int in the array. Is that even possible? I don't want to ask for the hole array if possible.

Wire.requestFrom(2, 6);    // request 6 bytes from slave device #2

Here it just ask for 6 bytes...

So am I getting this?
Make a array[simulated ram]
Have the value of the pins(or int) written to the array
array[1] = digitalRead(pin1)
array[2]=analogRead(pin2)
array[3]= val1
, and so on

and then on the requesting arduino

Wire.requestFrom( address,simulated ram, true); //dont know what the true is for, copied from your post(end connection when finished?)
//and I'm hoping to request ints, but wouldn't this send bytes?
int buffer[10];

buffer[1] = Wire.read();
buffer[2] = Wire.read();
buffer[3] = Wire.read();

I was hoping that it would be possible to write the int to a specific address on the internal SRAM and ask for a that specific value/address over Wire
Then a wouldn't need to send/request the hole array and use the bus to much.

The whole array is not a big problem.
The I2C session has overhead, so transferring 4 to 16 bytes takes only a little more time.

Please don't use the 'true' or 'false' at the end of requestFrom and endTransmission at all. It is an extra feature and you don't need it.

Did you read the page of Nick Gammon. Using I2C_Anything library is an option.

The transfer is in bytes, but I use a structure or union or array to get my data. You have to change the integer into bytes and vice versa somehow.

In my setup, the master sets first the register address (that is the index in the array in the Slave) and after that the Master requests the data. That are two I2C sessions for every data request. The Slave has the onReceive and onRequest handlers. The onReceive handler receives the register addres, and the onRequest handlers returns data to the Master (using the register address as index to the array).