const int relayPin = 4;

void setup() 
{
  Serial.begin(115200);
  pinMode(relayPin,OUTPUT);
}

void loop() 
{
  Serial.println("LED on");
  digitalWrite(relayPin, HIGH);
  delay(1000);

  Serial.println("LED off");
  digitalWrite(relayPin, LOW);
  delay(1000);
}
Loading
esp32-s2-devkitm-1
NOCOMNCVCCGNDINLED1PWRRelay Module