Count amount of times a boolean changed value

The loop( ) function is run 1000s of times per second, over and over and over again.

When lightVal >= 800 is true, since loop( ) keeps looping, you will have 1000s of Counts occurring.


BTW
ticker == true; should be ticker = true;

= verses ==