Help with Arduino program

I've rewritten from scratch my response three or four times... the "state" concept is obvious to me but I remember it was not easy to grasp at first, and definitely not easy to explain, I hope I was clear enough in my attempt. :slight_smile: