Will Be True As Long As Button Is Pressed; Serial.println("Start Is Being Held") - Keyestudio 4DOF Manual

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

Advertisement

return;
ps2x.read_gamepad(false, vibrate);
if(ps2x.Button(PSB_START))

Serial.println("Start is being held");

if(ps2x.Button(PSB_SELECT))
Serial.println("Select is being held");
if(ps2x.Button(PSB_PAD_UP)) {
Serial.print("Up held this hard: ");
Serial.println(ps2x.Analog(PSAB_PAD_UP), DEC);
}
if(ps2x.Button(PSB_PAD_RIGHT)){
Serial.print("Right held this hard: ");
Serial.println(ps2x.Analog(PSAB_PAD_RIGHT), DEC);
}
if(ps2x.Button(PSB_PAD_LEFT)){
Serial.print("LEFT held this hard: ");
Serial.println(ps2x.Analog(PSAB_PAD_LEFT), DEC);
}
if(ps2x.Button(PSB_PAD_DOWN)){
Serial.print("DOWN held this hard: ");
Serial.println(ps2x.Analog(PSAB_PAD_DOWN), DEC);
}
//read controller and set large motor to spin at 'vibrate' speed

//will be TRUE as long as button is pressed

//will be TRUE as long as button is pressed
239

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 4DOF and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF