I am trying to initialize the position of four legs on my quadruped. I have the servo values in an array and would like to set them with a loop structure. the legs are labels: leg1, leg2, leg3 and leg4. Right now I have them initialized like so:
leg1.write(90); // set leg1 to neutral position
leg2.write(90); // set leg2 to neutral position
leg3.write(95); // set leg3 to neutral position
leg4.write(98); // set leg4 to neutral position
I would like to perform this in a loop like:
for (int count=0;count<4;count++)
where servo_value is the setting for the servos.