#include int LED = D7; void setup() { pinMode(LED,OUTPUT); Wire.begin(8); //Address of wired slave Wire.onReceive(info); } void loop() { /* A slave doesn't need a loop, just a function for when it receives information */ } void info(int hey){ while(Wire.available()){ //Works when there is information sent char L = Wire.read(); //Reads the information sent, info sent as written, not numbers if(L == '1'){ digitalWrite(LED, HIGH); } else{ digitalWrite(LED, LOW); } } }