#include void setup() { Serial.begin(115200);//begin serial monitor at 155'20 baud Wire.begin(); // join i2c bus (address optional for master) pinMode(2,OUTPUT);//sets the Built in led as an output }//close void setup void loop() { while (Serial.available()) { //while the serial monitor is "avaliable" open char c = Serial.read();//read the value typed on the serial monitor and store it on a character variable called "c" if(c=='H') {//if the variable "c" is equal to the character "H" Wire.beginTransmission(4);//then open comunication to the node on adress "4" Wire.write('H');// write the value "H" to the message to send Wire.endTransmission();//finish transmition of the message Serial.println("writing to address 4!");//print on the serial monitor were have the message sent to }//close first if else if(c=='L') {//otherwise check if the value is the charater "L" Wire.beginTransmission(4);//again begin transmision of a message to addres "4" Wire.write('L');//write the character "L" Wire.endTransmission();//finish transmision of the message Serial.println("writing to address 4!");//write on the serial monitor were just sent the message }//close second if }//close while }//close void loop