Creating a mobile engine for my baby son

I just wanted to regulate the delay time with the rotary encoder. So each step the programm reads the rotary encoder and adapts the delay time.