Example Arduino code that spins motor when button is pressed