Right. So the problem with my execution was it was just smashing through it all at once and thus not giving it the time to properly execute. That's what I didn't fully grasp in your first explanation.
If I understand correctly, by using if/else within a function using the timers, it will execute in a time appropriate fashion with proper controls, instead of firing everything at once and then having it wait until later to find all the variables have changed as part of the initial for execution..
Ironically your last code is similar to something else I tried which used setInterval and a clearInterval inside of a setTimeout, but as the loop executed, the intervals conflicted with each other due to their method of execution.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Right. So the problem with my execution was it was just smashing through it all at once and thus not giving it the time to properly execute. That's what I didn't fully grasp in your first explanation.
If I understand correctly, by using if/else within a function using the timers, it will execute in a time appropriate fashion with proper controls, instead of firing everything at once and then having it wait until later to find all the variables have changed as part of the initial for execution..
Ironically your last code is similar to something else I tried which used setInterval and a clearInterval inside of a setTimeout, but as the loop executed, the intervals conflicted with each other due to their method of execution.
Again, thanks so much for your help!