Keywish Hummer-Bot-2.0 Instruction Manual page 106

Table of Contents

Advertisement

void
setup() {
Serial.begin(9600);
delay(500);
//added delay to give wireless ps2 module some time to startup,
before configuring it
//CHANGES for v1.6 HERE!!! **************PAY ATTENTION*************
//setup pins and settings: GamePad(clock, command, attention, data, Pressures?,
Rumble?) check for error
error
= ps2x.config_gamepad(PS2_CLK, PS2_CMD, PS2_SEL, PS2_DAT, pressures,
rumble);
if(error
== 0){
Serial.print("Found Controller, configured successful
Serial.print("pressures =
if
(pressures)
Serial.println("true
else
Serial.println("false");
Serial.print("rumble =
if
(rumble)
Serial.println("true)");
else
Serial.println("false");
Serial.println("Try out all the buttons, X will vibrate the controller, faster
as you press
harder;");
Serial.println("holding L1 or R1 will print out the analog stick
Serial.println("Note: Go to www.billporter.info for updates and to report
bugs.");
}
else
if(error
== 1)
Serial.println("No controller found, check wiring, see readme.txt to enable
debug. visit www.billporter.info for troubleshooting
else
if(error
== 2)
Serial.println("Controller found but not accepting commands. see readme.txt to
enable debug. Visit www.billporter.info for troubleshooting
else
if(error
== 3)
Serial.println("Controller refusing to enter Pressures mode, may not support it.
");
type
= ps2x.readType();
");
");
");
103
");
values.");
tips");
tips");

Advertisement

Table of Contents
loading

Related Products for Keywish Hummer-Bot-2.0

Table of Contents