GPIO exercises
Serial input by buttons
Write a program that reads the pressings of two buttons. A sequence of 8 buttons pressings should be detected and a corresponding byte should be constructed by assigning bit 0 to one of the buttons and 1 to the other. If the time between two pressings are longer than a given value, the process should be reset.