Are the motor wires and the Arduino button wires near each other? I'll assume the internal pullup is enabled on D13. However perhaps you need a stronger pullup. 5k or 10k.
Are the motor wires and the Arduino button wires near each other? I'll assume the internal pullup is enabled on D13. However perhaps you need a stronger pullup. 5k or 10k.