Update main.c

Prevent from high CPU load while the button is kept pressed