I am working on a project which requires me to count the number of time a certain action has occurred. I have a photoresistor attached to the analog input, and have successfully converted it to volts. However, I need to find some way of determining how many times the voltage has exceeded an arbitrary value since the arduino was last turned on/reset/whatever. I have tried using the ++ increment, but I haven't had much success.
Post ALL the code, not just what you think is relevant.
loop() repeats, so every time you go through it, HighCount starts off as 0. setup() is there to perform one-time initializations, but to take advantage of that, the declaration of HighCount must precede both setup() and loop().