A project i have to do

floatSwitch1State never gets updated in the loop, and anyway the loop is not necessary, because the digital write will remember its state.

(Can you please remember that there are some grown-ups here, and not all of them speak txt?)