vibrate = ps2x.Analog(PSAB_BLUE);
if (ps2x.NewButtonState())
{
if(ps2x.Button(PSB_R3))
{
//Serial.println("R3 pressed");
//record
s1=myservo1.read();
delay(100);
Serial.println(s1);
s2=myservo2.read();
delay(100);
Serial.println(s2);
s3=myservo3.read();
delay(100);
Serial.println(s3);
s4=myservo4.read();
delay(100);
Serial.println(s4);
jiyi1[i]=s1; //save the servo value read in the array sequentially
jiyi2[i]=s2;
jiyi3[i]=s3;
jiyi4[i]=s4;
//this will set the large motor vibrate speed based on
//how hard you press the blue (X) button
//will be TRUE if any button changes state (on to off, or off to on)
257
Need help?
Do you have a question about the 4DOF and is the answer not in the manual?
Questions and answers