

Click on the other Arduino and replace the code provided with the second set of code you found in the link. Delete the code that is provided and replace it with one set of code you found in the 12C link. Confirm that you want to use only text, not blocks. Click the dropdown menu below the Code button and select Text. To program an Arduino, click on it to select it, then click Code. Go to: for an Arduino wiring diagram and basic code for both Arduinos. Procedure: Part 1 - Generate Random Numbers and Print them to the Serial Monitor A. generate random number between 0 to 255 setup the baud serial communication with reciever arduino setup the baud serial communication with serial monitor this function is registered as an event, see setup()

function that executes whenever data is received from Wire.onReceive(receiveEvent) // register event Refer to the "Wire Master Writer" example for use with this Receives data as an I2C/TWI slave device Wire.beginTransmission(4) // transmit to device #4 Wire.begin() // join i2c bus (address optional for This example code is in the public domain. Refer to the "Wire Slave Receiver" example for use with this Writes data to an I2C/TWI slave device
