jiyi3[i]=s3;
jiyi4[i]=s4;
i++;
j=i;
// delay(100);
Serial.println(i);
}
if(ps2x.Button(PSB_L3))
{
//Serial.println("L3 pressed");
i=0;
//执行
pos1 = myservo1.read();
pos2 = myservo2.read();
pos3 = myservo3.read();
pos4 = myservo4.read();
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.
{
myservo1.write(pos1); // servo 1 executes the action
delay(5); // delay 5ms,controlling the rotating speed of servo