Don't incremenet the event counter if we are still servicing
the previous trigger. Moved to select() to detect if the fd
still has readable data on it. Update to script_adc to allow
10 triggers to fire before exiting.