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

#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;
}