Go Down

Topic: Keep an attachInterrupt for determinate time (Read 358 times) previous topic - next topic

cattledog

I believe that the processor speed is not the reason for the different behaviour I saw on a UNO and and ESP8266.

If memory does not crash, the standard millis() timer can be used start and stop the bigNumber function.

Quote
I said that delay() and millis() are not accurate becouse the time to process the number affect the time to stay on the function. For sample the next code using the millis() to stay in the function.
Specifically, what accuracy issues? Have you tried micros() instead of millis()?

Code: [Select]
int arrayValues[] = {1168,1428,1706,1428,1650,1288,1490,1863,1221,1811,1486,1827,1986,1524,
  1187,1517,1540,1241,1807,1003}; //total time aprox 30 seconds


If you need to run the function in these unequal periods you need to pass these values to the interval.

I am still uncertain that you need an external interrupt to gate the function as opposed to a software timer.

Go Up