Asked
— Edited
I have a script that I want to run none stop. What is the best way to do this?
PWM Servo Feedback (ADC)
— Add ADC positional feedback to hobby PWM servos via minor mod to EZ-B/Arduino; enables real-time position readout, calibration and puppet mirroring
Try it →
Adjust the sleep as required but it's always an idea to have a slight delay to avoid resource hogging.
I prefer using the repeatuntil command for continuously running loops....
Rich, I thought the goto would only work in an IF statement.
Richard R, I'm having trouble working with repeatuntil.
Labels and Gotos work anywhere.
Basic loop
I would recommend using Goto instead of RepeatUntil(0) because the Goto will use 1 less cpu instruction than RepeatUntil(0). That means a goto is a teeny bit faster
Thanks guys. I'm slowly learning this. Its hard to learn easy things when all the Arduino and other things I'm use to using are much more comp0licated. I seem to be overthinking things a bit.
Thanks for all the help.
@DJ, that's good to know. For some reason I thought the repeatuntil would be way faster and more efficient than the old goto loop. Sounds like they are not much different in terms of resources. Maybe the repeatuntil is just a little more neater to look at. I guess it depends on who you are.