const int relayPin = 8; //the base of the transistor attached to void setup() { pinMode(relayPin, OUTPUT); //initialize the relayPin as an output } void loop() { digitalWrite(relayPin, LOW); //drive relay closure conduction delay(1000); //wait for a second digitalWrite(relayPin, HIGH); //drive the relay is closed off delay(1000); //wait for a second }