// Define the pin connected to the relay module
const int relayPin = 7; // Pin connected to IN on relay module
void setup() {
// Initialize the relay pin as an output
pinMode(relayPin, OUTPUT);
}
void loop() {
// Turn the relay on (connects COM to NO)
digitalWrite(relayPin, HIGH);
delay(1000); // Wait for 1 second
// Turn the relay off (disconnects COM from NO)
digitalWrite(relayPin, LOW);
delay(1000); // Wait for 1 second
}