storing the values in buffer using i2c

how to store d values in buffer using i2c????????????????????
can anyone help me for this idea??????????

Values should store before the i2c communication happens ????????????

char textBuffer[20] = "hello world";

Not what you want? Explain clearly which values need to be stored in the buffer.

I wrote code for master and slave via i2c communication.
Like how i wrote d program is slave will send the data and master will receive data.
What i wanted now is before i2c communication happens, i need to store the sending data of slave in slave program in slave buffer and whatever data is receiving from slave to master it should also be saved in master buffer.
I have sent the code of slave see once the code and let me the solutions for this???

new_slave_v4_330_8_7.ino (1.55 KB)

Please read this post:

How to use this forum - please read.

Please post your code using code tags. The code tags make the code look

like this

when posting source code files. It makes it easier to read, and can be copied with a single mouse click. Also, if you don't do it, some of the character sequences in the code can be misinterpreted by the forum code as italics or funny emoticons.

Unless the sketch is too large, it's better if you post your code, rather than attach it. When it's attached, we have to download it, create a folder then open your code in our IDE. And afterwards, the folder remains unless we navigate to the "Temp" folder and manually remove it. It's much easier to just view the code in your post.