I know a dirty way to make it work call delay for 1ms and use a for counter to make up the rest of your delay time that way your only blocking the interrupt for 1 ms
const int led = 13;
const int Op1 = 8;
const int Op2 = 9;
const int Op3 = 10;
const int Op4 = 11;
const int int1 = 2; //Interrupt 0;
int lState = LOW;
int buttonState = 0;
long previousMillis = 0;
long inter = 1000;
//long UniTime = 10000;
int StateCheck =0;
void setup()
{
// digital pins=output
pinMode(led, OUTPUT);
pinMode(Op1, OUTPUT);
pinMode(Op2, OUTPUT);
pinMode(Op3, OUTPUT);
pinMode(Op4, OUTPUT);
pinMode(int1, INPUT);
//attachInterrupt(0, stop1. HIGH);
}
void loop()
{
buttonState = digitalRead(int1);
if (buttonState == LOW) {
StateCheck =1;
digitalWrite(Op1, HIGH);
for (int x=0; x < 10000; x++){
delay(1);
}
digitalWrite(Op1, LOW);
for (int x= 0; x < 1000; x++){
delay(1);
}
digitalWrite(Op2, HIGH);
for(int x=0; x < 10000; x++){
delay(1);
}
digitalWrite(Op2, LOW);
for (int x= 0; x < 1000; x++){
delay(1);
digitalWrite(Op3, HIGH);
for(int x=0; x < 10000; x++){
delay(1);
}
digitalWrite(Op3, LOW);
for (int x= 0; x < 1000; x++){
delay(1);
}
digitalWrite(Op4, HIGH);
for(int x=0; x < 10000; x++){
delay(1);
}
digitalWrite(Op4, LOW);
for (int x= 0; x < 1000; x++){
delay(1);
}
StateCheck = 0;
}
}
}
this will work but like I said its dirty and not the "right" way to do this. As long as your pulse change is longer then 1 ms you should be fine.