DPDT Toggle switch and Arduino timer

It works but it cycles continuously?

Things in the loop() function tend to do that.