The input-handling code is rather short. For some reason my spidey sense tells me I should make it interrupt-driven instead of polling the pins in the main loop. Ideally I would like to place most of the main loop's code in interrupts and let the MCU rest in-between. tick() only needs to be called every second. The only remaining problem is the rendering itself. The render() function is called every 8 milliseconds but I have to call it five times in a row in order for the multiplexing illusion to work, not sure if it's suitable for an interrupt.
The input-handling code is rather short. For some reason my spidey sense tells me I should make it interrupt-driven instead of polling the pins in the main loop. Ideally I would like to place most of the main loop's code in interrupts and let the MCU rest in-between. tick() only needs to be called every second. The only remaining problem is the rendering itself. The
render()function is called every 8 milliseconds but I have to call it five times in a row in order for the multiplexing illusion to work, not sure if it's suitable for an interrupt.