serial transmisson

i have a i2c network of two arduinos. i should be able to receive the data from slave to the master serially on command.here is my code please help me out. the data are numbers

void transmit() {

char data[300]; Wire.beginTransmission(0x08); Wire.write(0x0D); Wire.endTransmission();

Wire.requestFrom(0x08, 1); //requesting slave to send data x = Wire.read(); if (x == 0x1D) { Serial.print("recieved from payload is: "); Serial.println(x, HEX); Serial1.begin(115200);

{ byte n = Serial1.readBytes(data,300); { Serial.print(n); }

}}}

Please, make a hand drawn diagram of your connection of Arduinos on a piece of paper; take the image and post here. Also, take a photo of your hardware setup and post it here. The procedures for posting an image on the post page are:

1. Load the picture from your phone into PC and save as picture file (like jpeg or png). 2. Attach the file in the post. 3. Post the post page. 4. Save the link address of your file. 5. Open the post page in Modify mode. 6. Place the cursor on your post page where you want to place the picture. 7. Click on the Insert an image icon of the Tool Bar of the post page and follow menu.

Simple Image Guide

...R

https://drive.google.com/open?id=0BwfkjCIthVlyVUlpU3NUT2NxVGl3UGxSWVNKY2NtWDVsWGs0

You have said in your original post that the Arduinos are connected by I2C Bus. Now, you have posted diagram of UART Port. You have not also posted the camera image of your hardware setup. Do you really have these two Arduinos? If so, post their photos as proof.

yes i do the arduino is connected via i2c as well as serially where the i2c conection is to send commmands to the arduino and serial connection is to transmit data.

What command (give example) do you want to send from MEGA to Slave using I2C bus? What I2C address do you like to assign for Slave?

What kind of data you want to acquire from UNO via UART Port. Is it the hardware UART Port or the software UART Port (SUART) you want to use for serial communication? As hardware UART Port (simply UART) Port is permanently engaged with SM/IDE, it is preferred that you use the SUART Port.

Show connections for both I2C Bus and SUART Port with necessary DPin numbers.

Where are the photos of your MEGA and UNO with your fingers placed on them?

Criton, please read the post in the top thread titled How to use this forum - please read. an put code tags around your code.

Also post the whole code.

Did you try any of the Wire library examples in your IDE? It is good to start with working code and keep it working step by step on the way up.