#define PIN_RELAY 2 // the Arduino pin, which connects to the IN4 pin of relay module
// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(9600);
// initialize digital pin as an output.
pinMode(PIN_RELAY, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
Serial.println("Turn on");
digitalWrite(PIN_RELAY, HIGH);
delay(1000);
Serial.println("Turn off");
digitalWrite(PIN_RELAY, LOW);
delay(1000);
}