Surely those of us with experience need to encourage and attempt to help here.. . Lets review what the replys have said..
1. Declaration of the for loop control variable is not standard in the for statement in any of the ISO standards for C or C ++ it is optional but in fact professional programmers and teaching estsablishments tend to avoid declarations of variables within code segements since documentation is difficult hence maintenance becomes a problem.
It is usually regarded as good practice to declare variables with only the scope that they need. Hence
for (int x = 0; x < 255; x++)
Where the value of x is unimportant outside of the for loop.
2. Agree don't use Globals AT ALL in fact in a real development enviroment rather than the fiddled Arduino IDE it is generaly not possible to declare Globals.. In test Sketch solutions use them but always beware of code side effects.
Despite what I said above I believe that globals have a place in the Arduino environment. Not least to avoid the need to pass multiple parameters to functions and to complicate returning multiple results. What is important is sensible and consistent variable names.
3. Does it matter if we call the loop void answer it majes no difference and to a newbie programmer the fact there is a void in the declaration means its a natural name to give it.
Yes it matters. Calling a function a void shows a fundamental misunderstanding of what a function is
My beef here is that there is no need for prototypes in the IDE you can compile anything the whole essence of C /C++ tight type control has been lost.
How does the lack of function prototypes remove tight type control. If prototypes are important to you then use them. Oh, and you cannot, of course, "compile anything"
4. For loops are running but running fast, proven by print statements which would distort all meaningful measurements.
The primary problem here was testing whether the for loops were running. Precise timing, if necessary, was a secondary objective.
Come on chaps lets try and help people on this forum, Arduino is a great teach / learning tool, it also is finding good markets in fast product prototyping the subject of my latest book..
What was not helpful in this thread ? Arduino is a great learning tool but it is at its best when you try new things for yourself based on something that worked. When things don't behave as expected then the fun, and much of the learning starts.
In this case its fairly obvious that the guys got his hardware screwed up, its not a programming problem
Not obvious at all
Lets ask the question whats the step rate specified for the motors? its probably much slower than his for loop execution and the hardwares simply not responding..