Home Forums PS2X PlayStation 2 Controller Library Support Forum Help ps2x.config_gamepad(13,11,10,12, true, true);

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2113
    Anonymous
    Inactive

    ps2x.config_gamepad(13,11,10,12, true, true);

    I used that and changed it to my arduino mega to

    ps2x.config_gamepad(20,22,21,23, false, false);

    And it says: arduino-1.0.3/PS2X_Example.pde:180: undefined reference to `PS2X::config_gamepad(unsigned char, unsigned char, unsigned char, unsigned char, bool, bool)

    ‘\arduino-1.0.3/PS2X_Example.pde:33: undefined reference to `PS2X::readType()’

    #2114
    Anonymous
    Inactive

    This is the whole intire code  i used

     

    #include <PS2X_lib.h>

    int E1 = 4;
    int M1 = 5;
    int E2 = 7;
    int M2 = 6;
    void setup(){
    ps2x.config_gamepad(21, 23, 22, 24, false, false);
    }

    void loop(){
    if (PSS_RY == 126);
    {
    digitalwrite(M1, HIGH);
    digitalwrite(E1, HIGH);
    }
    if (PSS_LY == 126);
    {
    digitalwrite(M2, HIGH);
    digitalwrite(E2, HIGH);
    }
    if (PSS_RY == -126);
    {
    digitalwrite(M1, LOW);
    digitalwrite(E1, HIGH);
    }
    if (PSS_ly == -126);
    {
    digitalwrite(M2, LOW);
    digitalwrite(E2, HIGH);
    }
    if (PSS_RY == 0);
    {
    digitalwrite(M1, LOW);
    digtialwrite(E1, LOW);
    }
    if (pss_ly == 0);
    {
    digitalwrite(M2, LOW);
    digitalwrite(M2, LOW);
    }
    delay 50;
    }

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