Keyestudio 4DOF Manual page 213

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

Advertisement

www.keyestudio.com
return;
ps2x.read_gamepad(false, vibrate);
to spin at 'vibrate' speed
if(ps2x.Button(PSB_START))
pressed
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: ");
//read controller and set large motor
//will be TRUE as long as button is
//will be TRUE as long as button is pressed
210

Advertisement

Table of Contents
loading

Table of Contents