Arduino-PS2X icon indicating copy to clipboard operation
Arduino-PS2X copied to clipboard

Joysticks ohne Funktion ?

Open DK0975 opened this issue 2 years ago • 4 comments

Hallo. Ich habe einen PS2 Wireless Controller genauso angeschlossen wie es für das Beispiel erforderlich ist. Alles mehrfach kontrolliert. Im seriellen Monitor kommt bei allen Tasten eine Ausgabebestätigung. Beim drücken der Joysticks kommt die Meldung da R3, bzw. L3 gedrückt wurde. Beim betätigen der Joysticks in X oder Y (egal ob rechts oder links) kommt im seriellen Monitor keine Ausgabe. Woran könnte das liegen ?

DK0975 avatar Aug 30 '23 18:08 DK0975

Just checking that you are holding R1 or L1 to print the values as is in the example?

SerEpicPanda avatar Aug 31 '23 00:08 SerEpicPanda

Beim drücken von L1 oder R1 bekomme ich Werte (weiß aber jetzt nicht welche).

DK0975 avatar Aug 31 '23 04:08 DK0975

In this bit of code it shows which values are printed whilst R1 or L1 are pressed. In this case LY, LX, RY, RX. you could add labels in the print statements to make it clearer.

if(ps2x.Button(PSB_L1) || ps2x.Button(PSB_R1)) { //print stick values if either is TRUE Serial.print("Stick Values:"); Serial.print(ps2x.Analog(PSS_LY), DEC); //Left stick, Y axis. Other options: 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); }

SerEpicPanda avatar Aug 31 '23 08:08 SerEpicPanda

Okay. Es funktioniert. Vielen Dank für die Hilfe. Das ist ja eine UND-Funktion von R1(L1) mit dem jeweiligen Stick. Schade das die Joysticks nicht separat genutzt werden können.

DK0975 avatar Aug 31 '23 15:08 DK0975