i will be designing a robot with multiple stepper motor. is it advisable to use millis instead of delay here or not? right now im testing if Millis() would work but still having a hard time programming this.
Arduino function delay() which pauses the program for an amount of milliseconds specified as parameter.
millis(), on the other hand, is a function that returns the amount of milliseconds that have passed since program start.
Just like delay() has a microsecond-version called delayMicroseconds(), millis() has micros(). If you need better resolution, micros() may be the way to go.
However, be aware that micros() will overflow after approximately 70 minutes, compared to millis()‘s 50 days. This means that the functions’ return values will start all over from zero.