SDA and SCL on Arduino MEGA (notR3)

I am using a simple send receive sketch to send data from one Mega to another)

I am using Pins 20-sda and 21-scl on both. The wires are going SDA to SDA and the same for the other.

Still, I get no communication.

I attached the sender and receiver sketches.

Please help.

WireSlaveSender2Variables.ino (1.1 KB)

WireMasterReader2Variables.ino (994 Bytes)

Are ground connected ?

Oh, my god, I am an EE and did not think of it,

May the Force be with you, thanks

MITCH

I established communication, but still cant do what I want.
The sender Mega has also a MPU6050 IC2 device connected to the SCL and SDA. THis is a compass.

I want to extract 2 of the values (Pitch and direction) and send them to another arduino mega for processing.

When the I2C is to serve two devices it blocks. I think this can be done, I2C is know to support multiple devices at the same time.

Where am I going wrong?

See the sketch.
Wire.begin(); _gets the compass data

Wire.begin(8); is suppose to send the data when invoked by the other Mega/

thanks

WallE_Tilt_MPU6050_05_WireH_Sender.ino (9.05 KB)

Have a look here for a basic example and there for the library