#include //library for I2C byte own_address = 4; //set own adress. void setup() { Wire.begin(own_address); //enter the bus on specified address Wire.onReceive(receiveEvent);//set the board as reveicer and call a function called receiveEvent pinMode(13, OUTPUT);//set the pin of the led built in as an output digitalWrite(13, LOW);//set the led builtin as low in the begining of the code }//close void setup void loop() { } void receiveEvent(int howMany) { while (Wire.available()) {//while the serial comunication is available using the wire library char c = Wire.read();//use character variable called "c" to store de value of the message sent from the host if(c=='H') {//check the condition if the variable "c" equals the character "H" digitalWrite(13,HIGH);//if this is thruth then turn LED on }//close first if else if(c=='L') {other whise check if the value of the variable "c" is equal to the character "L" digitalWrite(13,LOW);// if this condition is true then turn LED off }//close second if }//close while }//close void receiveEvent