Brushless motor and code

fixed. I just had to write an if statement for when the button is not pressed