// constants won't change. They're used here to set pin numbers: const int IntanTTL = 12; // the number of the pushbutton pin const int relayTTL = 10; // the number of the pushbutton pin boolean enableLoop = true; void setup() { // initialize the LED pin as an output: pinMode(IntanTTL, OUTPUT); pinMode(relayTTL, OUTPUT); } void loop() { if (enableLoop == true) { for (int i = 0; i < 60; i++) { digitalWrite(IntanTTL, LOW); digitalWrite(relayTTL, HIGH); delay(300000); digitalWrite(IntanTTL, HIGH); digitalWrite(relayTTL, LOW); delay(300000); if (i == 19) { enableLoop = false; } } } digitalWrite(IntanTTL, LOW); digitalWrite(relayTTL, HIGH); }