When using PS2X Library with 5V Arduino Nano, it works fine. I try to convert it into wireless standalone controller, so I would like to go for Arduino 3.3V Mini Pro with 8 Mhz. Since I/O is 3.3V I should be able to skip the pullup resistors which i needed with 5V I/O.
The LED on PSX Controller is on, but I always get following message:
"Unknown Controller type found No controller found, check wiring, see readme.txt to enable debug. visit www.billporter.info for troubleshooting tips"
I assume some timings needs to be reconfigured, but I don't know which one and in which direction.
Does anyone managed to get it run on 8Mhz and can provide values for CTRL_CLK, CTRL_CLK_HIGH, CTRL_BYTE_DELAY?
Without using any resistors the gamepad is found with following settings:
#define CTRL_CLK 10 #define CTRL_BYTE_DELAY 6
sometimes the pad is not recognized at first trial, so I made a loop around the gamepad configuration and try it until it works:
int error = -1;
while (error != 0)
{
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 values.");
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 tips");
}
else if (error == 2)
{
Serial.println(
"Controller found but not accepting commands. see readme.txt to enable debug. Visit www.billporter.info for troubleshooting tips");
}
else if (error == 3)
{
Serial.println(
"Controller refusing to enter Pressures mode, may not support it. ");
}
delay(300);
}