void TimePopDown() {
Serial.println("TimePopDown RAN");
for (int i = 0; i < moleNumber; i++) {
if (popTime[i] != 0 ) {
popTime[i] = popTime[i] - 1;
Serial.print(popTime[i]);
Serial.print(" ");
};
Serial.println("");
};
}
so basically I have a array called popTime[] and it has a bunch of timer values that need to be decremented every millisecond. I then use that to turn a pin low later in some other code if it has not all ready be turn low by the user.
edit oh and i need a way to stop from run once all of the elements in the array equal zero.
1000th of a millisecond - is one microsecond.
I doubt that your function/code will complete within a single microsecond - so you'll get a crash pretty quickly.
HOWEVER, if you meant 1000mS, then that's entirely possible.
Set up a millis() timer, and every 1000mS - call your function.