Keyestudio 4DOF Manual page 231

Robot mechanical arm kit for arduino diy
Hide thumbs Also See for 4DOF:
Table of Contents

Advertisement

vibrate = ps2x.Analog(PSAB_BLUE);
if (ps2x.NewButtonState())
{
if(ps2x.Button(PSB_R3))
Serial.println("R3 pressed");
if(ps2x.Button(PSB_L3))
Serial.println("L3 pressed");
if(ps2x.Button(PSB_L2))
Serial.println("L2 pressed");
if(ps2x.Button(PSB_R2))
Serial.println("R2 pressed");
if(ps2x.Button(PSB_GREEN))
Serial.println("Triangle pressed");
}
if(ps2x.ButtonPressed(PSB_RED))
Serial.println("Circle just pressed");
//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)
//will be TRUE if button was JUST pressed
228

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents