Wow! That crazy little simple line of code... After pulling my hair out for three hours!! I envy you programmer wizards. Thank you guys for that! Sorry, BulldogLowell -- your suggested code was just way too sophisticated for me to have seen, and been able to use, that line...
I didn't know where to put it so just pasted it in at the top of my rightServoSweep() function and it worked! I was just about to give up on software and just use two Nanos (which may still be on my list for the next steps...)
But yes, lastchancename, I'm hoping for asynchronous eyebrows too. I tried using a flag as you suggested below but couldn't figure out how to make it work.
lastchancename:
The code looks a bit complicated, but since the servos move independently, you can keep separate direction flags, and toggle them when each servo reaches a limit...
Then use that flag to increment or decrement as appropriate during the run phase.
Now that I have them both going up and down together my next self-punishment will be to try to make them asynchronous, and only go up and down a couple of times.
Any help beforehand would surely be appreciated. (lastchancename, if your suggestion is the solution, could you explain a little more about how I would use the flag? -- I haven't had much luck with flags so far.
On a related, but different flag mission, I want to stop the ongoing sweep of the servos, so I set a 'count=1' flag at the top of setup() and set it to 0 at the bottom of one of the servo functions to just stop that servo, but that didn't work).
I'm sure I'll be back soon...
P.S. I hopefully didn't need to say it, but the code besides the servo stuff can be ignored. I just wanted to include all of the code (posting it was blocked several times saying I exceeded the 9,000 character limit, so I had to trim out some comments).