Keywish Hummer-Bot-2.0 Instruction Manual page 109

Table of Contents

Advertisement

vibrate
= ps2x.Analog(PSAB_CROSS);
based on how hard you press the blue (X) button
if
(ps2x.NewButtonState()) {
to off, or off to on)
if(ps2x.Button(PSB_L3))
Serial.println("L3
if(ps2x.Button(PSB_R3))
Serial.println("R3
if(ps2x.Button(PSB_L2))
Serial.println("L2
if(ps2x.Button(PSB_R2))
Serial.println("R2
if(ps2x.Button(PSB_TRIANGLE))
Serial.println("Triangle
}
if(ps2x.ButtonPressed(PSB_CIRCLE))
pressed
Serial.println("Circle just
if(ps2x.NewButtonState(PSB_CROSS))
pressed OR released
Serial.println("X just
if(ps2x.ButtonReleased(PSB_SQUARE))
released
Serial.println("Square just
if(ps2x.Button(PSB_L1) || ps2x.Button(PSB_R1)) {
is TRUE
Serial.print("Stick
Serial.print(ps2x.Analog(PSS_LY), DEC);
LX, RY, RX
Serial.print(",");
Serial.print(ps2x.Analog(PSS_LX), DEC);
Serial.print(",");
Serial.print(ps2x.Analog(PSS_RY), DEC);
Serial.print(",");
Serial.println(ps2x.Analog(PSS_RX), DEC);
}
}
delay(50);
}
//this will set the large motor vibrate speed
//will be TRUE if any button changes state (on
pressed");
pressed");
pressed");
pressed");
pressed");
pressed");
changed");
released");
Values:");
106
//will be TRUE if button was JUST
//will be TRUE if button was JUST
//will be TRUE if button was JUST
//print stick values if either
//Left stick, Y axis. Other options:

Advertisement

Table of Contents
loading

Related Products for Keywish Hummer-Bot-2.0

Table of Contents