Hello Friend,
I'm 10 years industry experienced professional in electronics design and manufacturing.
I see you have used large blocking delay. It can help you to write more responsive code with input debouching for practical mechanical switches.
If I mention my professional background little bit,
I'm experienced professional (B.sc-applied science/M.Sc-applied electronics) in electronics, embedded micros and PC software programming.
In electronics, used Altium, PSpice, Eagle,Easy EDA, Ki CAD and Proteus design software for circuit simulation and Multi-layer PCB designs, and implementing communications protocols like USB, serial, etc.
In Embedded domain, did several projects using Arduino, PIC and AVR ,STM8, STM32, cypress PSOC micros in C/C++. And also exposed to VHDL for Altera and Xilinx FPGAs too.
Thanks and Regards,
Niroshan R