Hi, I´m using a shild for DC motor and my arduino uno, I want once I indicate in the code to pass the pin to LOW, the motor continues to operate 30 milliseconds more and slowing down .
I tried with delay() function but all the program go into the delay.
if(350 >= v2.x && v2.x >=250 && 300 >= v2.y && v2.y >= 200){
arduino.digitalWrite(ledPin, Arduino.HIGH);
}
else {
arduino.digitalWrite(ledPin, Arduino.LOW);
delay(3000)
}
}