I am trying to develop a prototype for a crane controller using arduino uno and some very basic wiring such as relays, contactors etc. In this i have 1 input which activates 1 output for activating a relay to switch on a motor. Now the motor has Starts per hour rating of 300 Starts per hour. Which means that in any 1 hour duration, the motor can be switched on 300 times. If the motor is started (output went from LOW to HIGH) for more than 300 times in any 1 hr duration, i have to activate an alarm.
Now, i am unable to figure out the programming technique for this. Anyone has done this before? Any ideas?