Homemade fan - motor madness
When debouncing buttons it is easiest to think of a 4 state machine.


The button is open and you will not jump to the next state until you see the button closed.
You saw the button closed.  Now you need to wait until the button stops bouncing open and close.  After about 100ms, if the button is still closed, jump to the next state.  Otherwise go back to state 1.
You are sure the button is closed.  Do the stuff you want to do when the button is pressed.  Now wait in this state until you see the button is open.
You saw the button open.  Now you need to wait until the button stops bouncing open and close.  After about 100ms, if the button is still open, jump to the first state.  Otherwise go back to state 3.


It is good practice to code this up.  However, there is an existing Arduino (de)bounce library to do this for you.