I see the potential of the bug that I earlier discussed.
millis() is unsigned long
long countpreviousMillis = 0; //stores count milliseconds
long countinterval = 1000; //1 second
OR
unsigned long countpreviousMillis = 0; //stores count milliseconds
unsigned long countinterval = 1000; //1 second
@jackwp
Thanks for participating.