I need to control a uv light and a dc motor for our projrct but I can't seem to get the module's delays properly...
here are my codes:
int RELAY1 = 7;
void setup() {
pinMode(9, OUTPUT);
pinMode(RELAY1, OUTPUT);
digitalWrite(RELAY1, HIGH);
}
void loop() {
digitalWrite(9, HIGH); // turn the LED on (HIGH is the voltage level)
delay(30000);
digitalWrite(9, LOW); // turn the LED off by making the voltage LOW
delay(30000);
digitalWrite(9, HIGH); // turn the LED on (HIGH is the voltage level)
delay(30000);
digitalWrite(9, LOW); // turn the LED off by making the voltage LOW
delay(30000);
digitalWrite(RELAY1,LOW); // Turns ON Relays 1/
delay(10000); // Wait 2 seconds (feeding)
digitalWrite(RELAY1,HIGH); // Turns Relay Off
delay(10000); // delay before it repeats feeding
}
after the dc motor in the pin 9 finishes the relay module runs and wont stop and the dc motor repeat it's pattern.. plz help I'm noob at this stuff