// Define the pin connected to the relay module
const int relayPin = 7;
void setup() {
// Set the relay pin as an output
pinMode(relayPin, OUTPUT);
}
void loop() {
// Turn on the relay (and the LED)
digitalWrite(relayPin, HIGH);
delay(2000); // Wait for 1 second
// Turn off the relay (and the LED)
digitalWrite(relayPin, LOW);
delay(2000); // Wait for 1 second
}