Hi
Is it possible to have a (void)loop within a (void) loop in a sketch?
Or is there a way to get a stepper motor to return to a defined point in it's revolution?
Thanks
Mick
Hi
Is it possible to have a (void)loop within a (void) loop in a sketch?
Or is there a way to get a stepper motor to return to a defined point in it's revolution?
Thanks
Mick
You can nest for loops, while loops, do..while loops, but you can't have two functions called "loop()".
I don't see how your question relates to stepper motors.
I can get my stepper motor to revolve, in one revolution, at a varying speed, and also to to revolve at different RPMs,
I need to make the stepper motor able to return to a pre-determined position within each revolution.
I thought that, with a loop within a loop, using the "outer loop" I could tell the motor to return to a particular (defined) position.
Using the reset button on the UNO just restarts it, and the motor is NOT then in a predetermined position.
Thanks
Mick
You need to learn about defining your own functions.