Add debouncing for switch and pot.