Test if the button is high and also if it were low last time.
button = digitalRead(pin);
if(button == HIGH && lastButton == LOW) {
.....
....
}
lastButton = button;
boolean buttonWasDown = FALSE;
void loop()
{
[...]
if (digitalRead(BUTTON_PIN) == HIGH)
{
if (!buttonWasDown) // Button was not already down
{
buttonWasDown = TRUE;
[ Do the motor thing]
}
}
else // Button is now up
buttonWasDown = FALSE;
[...]
}