i++;
j=i;
// delay(100);
Serial.println(i);
}
// carry out
if(ps2x.Button(PSB_L3))
{
//Serial.println("L3 pressed");
i=0;
tt=1;
pos1 = myservo1.read(); // record the angle value of 4 servo posture
pos2 = myservo2.read();
pos3 = myservo3.read();
pos4 = myservo4.read();
while(tt==1) // repeat the actions
{
for(int k=0;k<j;k++)
//for loop, to execute all the stored actions.
{
if(pos1<jiyi1[k])
// if the current servo 1 angle is less than the value stored in array 1.
{
while(pos1<jiyi1[k])
{
//while loop, make servo turn to the position of value stored in the array.
258
Need help?
Do you have a question about the 4DOF and is the answer not in the manual?
Questions and answers