I am using 2 different variables in Arduino Editor, with one incrementing up from 0 to 70, and one decrementing down from 70 to 0. I tried using a for loop for each operator, a nested for loop, and one for loop for both operators. The loop for each operator resulted in each loop finishing before going on to the next. A nested for loop resulted in the loop incrementing by 1, then having the second loop decrement to 0, before the first loop increments by 1 again. The third try will not even compile, and gives me the error code saying that it expects a semicolon before the parenthesis.
for(pos1=70;pos2=0;pos1>=0;pos2<=70;pos1--,pos2++){
I am relatively new to coding but I also looked at forums on how to increment two variables in the same loop which did not seem to help either. Any advice or tips would be appreciated, thank you.