I got some problem with the delay function in Arduino. I use Arduino Mega 2560. I want to have code with vary delay time value, some input will change the delay time value.
int x; int UPtime; void loop(); UPtime = (175-x)/70; CW(); delay(UPtime); OFFMOTOR();
But when I tried it, the delay time didn't change, the LED just blinking very quick. Hope someone can help me. Thank you.