Simple button library

used a state machine to be able to check for simple clicks