Hi
I need a timer to count actions on the serial monitor please.
The cod below is for testing rig for earth moving attachments product.
So, its open close 4 relay module in sequence which control hydraulic rams solenoid.
The test rig will run for few days but need to count how many void loop please?
I'd appreciate any advice you can give me.
Thanks
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
void loop() {
pinMode(7, OUTPUT);
digitalWrite(7, LOW); // Turn the rellay on
delay(2000); // wait for 2 second
digitalWrite(7, HIGH); // turn the rellay off
delay(600);
pinMode(8, OUTPUT);
digitalWrite(8, LOW); // Turn the rellay on
delay(2000); // wait for 2 second
digitalWrite(8, HIGH); // turn the rellay off
delay(600);
pinMode(9, OUTPUT);
digitalWrite(9, LOW); // Turn the rellay on
delay(2000); // wait for 2 second
digitalWrite(9, HIGH); // turn the rellay off
delay(600);
pinMode(10, OUTPUT);
digitalWrite(10, LOW); // Turn the rellay on
delay(2000); // wait for 2 second
digitalWrite(10, HIGH); // turn the rellay off
delay(600);
}