Home Forums PS2X PlayStation 2 Controller Library Support Forum All buttons on controller sending "255"

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1717
    Anonymous
    Inactive

    First off I would like to thank you for this fantastic library!  I am part of my high-school’s ROV program and we will be using this to control our ROV.  Now, I have a problem where the analog sticks work fine, but all other buttons are registering as 255 (full on?) Is this just my controller?  I can’t check it with a PS2 because I cut the connector off.

    Thanks,

    Austin Bartz

    #1724
    Anonymous
    Inactive

    Which controller are you using? I bought a new one from gamestop here in town. My wires had a different color code, and I used a 10k resistor between data and Vcc, My buttons work fine, and report from 0 to 255, but my analog sticks only report values If I have R1 or L1 buttons pressed in. I wonder if both our issues are related to using a resistor on each of the wires as decsribed in the troubleshooting section.. I would like to try but i dont have the proper resistors right now.

    #1725
    Anonymous
    Inactive

    I am using an official Sony Dualshock 2 controller with the 10k resistor as a pull-up for the data line.

    #1726
    Anonymous
    Inactive

    Well I just took a better look at the example code I am using, and the problem I’m having is actually written into the code when either R1 or L1 are pressed it will show stick values.

    Are you using your own code? If you are maybe you could try running the example code to see if that reports the pressure values correctly.

    #1731
    Bill
    Member

    Hmm, everything working fine but button pressures are always 255? Since you are using an official sony controller, my only guess is the controller is just bad. Hopefully button pressures were something you needed. I can tell you even when they do work, they are very twitchy and not consistent, so you aren’t missing out on much.

    #1742
    Anonymous
    Inactive

    I don’t need button pressure, just on or off.  But they are all registering as on all the time even when they are never pressed.  So with the example code the vibrate motor is always going full and the stick values are being printed.  I am starting to think that it is a bad controller so I will try a different one, but this time I am not cutting the cord, that was just a huge pain in the arse to get all the leads soldered with out breaking.

    #1743
    Bill
    Member

    If you want just on and off, you should not be looking at the analog values. There’s a seperate data call for the digital (on/off) values.

    Use

    ps2x.Button(PSB_PAD_LEFT)

    Not

    ps2x.Analog(PSAB_PAD_LEFT)

    #1744
    Anonymous
    Inactive

    Thank you!  When I get back I will try that and report here.

     

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.