//Connect D22 to RELAY R1 or R2
#define RELAY_PIN 22 // ESP32 pin GIOP22 connected to the IN pin of relay
  
// the code in setup function runs only one time when ESP32 starts
void setup() {
  // initialize digital pin as an output.
  pinMode(RELAY_PIN, OUTPUT);
}

// the code in loop function is executed repeatedly infinitely
void loop() {
  digitalWrite(RELAY_PIN, HIGH);
  delay(1000);
  digitalWrite(RELAY_PIN, LOW);
  delay(100);
}
