Arduino strange behavior with dc motors