www.keyestudio.com
if (ps2x.NewButtonState())
off, or off to on)
{
if(ps2x.Button(PSB_L3))
Serial.println("L3 pressed");
if(ps2x.Button(PSB_R3))
Serial.println("R3 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))
//will be TRUE if any button changes state (on to
//will be TRUE if button was JUST pressed
187
Need help?
Do you have a question about the 4DOF and is the answer not in the manual?