Xbox 360 wireless controller programming issue

Hi

im having a bit of a issue with the digital write functions for the usb host shield which is connected to a wireless Xbox 360 controller. so far my code works perfectly however i am told that i needed to add something else, which will need me to output two low digital signals. the problem that i am facing is that one of the two signals that i need to output is already defined.

#include <XBOXRECV.h>


USB Usb;
XBOXRECV Xbox(&Usb);

int Second_LeftPin = 8;  
int Second_RightPin = 7;
int First_LeftPin = 6;
int First_RightPin = 5;
int lasuPin = 4;
int lasdPin = 3;
int raslPin = 2;
int rasrPin = 14;
int dprPin = 15;
int dplPin = 16;
int crossPin = 17;
int circlePin = 18;
int hwb = 19;


void setup(){
  Serial.begin(115200);
  
  pinMode(Second_LeftPin, OUTPUT);   
  pinMode(Second_RightPin, OUTPUT);
  pinMode(First_LeftPin, OUTPUT);   
  pinMode(First_RightPin, OUTPUT);
  pinMode(lasuPin, OUTPUT);
  pinMode(lasdPin, OUTPUT);
  pinMode(raslPin, OUTPUT);
  pinMode(rasrPin, OUTPUT);
  pinMode(dprPin, OUTPUT);
  pinMode(dplPin, OUTPUT);
  pinMode(crossPin, OUTPUT);
  pinMode(circlePin, OUTPUT);
  pinMode(hwb, OUTPUT);
 
  
  while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
  if (Usb.Init() == -1) {
    Serial.print(F("\r\nOSC did not start"));
    while (1); //halt
  }
  Serial.print(F("\r\nXbox Wireless Receiver Library Started"));
}

void loop() {
  Usb.Task();
    for (uint8_t i = 0; i < 4; i++) {
       if (Xbox.XboxReceiverConnected && Xbox.Xbox360Connected[0]){


/////////////////////////////////////////LT//////////////////

digitalWrite(Second_LeftPin, Xbox.getButtonPress(L2) ? LOW : HIGH);

/////////////////////////////////////////RT/////////////////

digitalWrite(Second_RightPin, Xbox.getButtonPress(R2) ? LOW : HIGH);

/////////////////////////////////////// LB/////////////////

digitalWrite(First_LeftPin, Xbox.getButtonPress(L1) ? LOW : HIGH);

///////////////////////////////////////RB///////////////////////

digitalWrite(First_RightPin, Xbox.getButtonPress(R1) ? LOW : HIGH);

/////////////////////////////////////Left Analog Up/////////////

digitalWrite(lasuPin, Xbox.getAnalogHat(LeftHatY) == 32767 ? LOW : HIGH);

//////////////////////////////////////Left Analog Down//////////

digitalWrite(lasdPin, Xbox.getAnalogHat(LeftHatY) == -32768 ? LOW : HIGH);

///////////////////////////////////////Right Analog left///////

digitalWrite(raslPin, Xbox.getAnalogHat(RightHatX) == -32768 ? LOW : HIGH);

//////////////////////////////////////Right Analog Right///////

digitalWrite(rasrPin, Xbox.getAnalogHat(RightHatX) == 32767 ? LOW : HIGH);

/////////////////////////////////////D Pad Right//////////////

digitalWrite(dprPin, Xbox.getButtonPress(RIGHT) ? LOW : HIGH);

///////////////////////////////////D Pad Left//////////////////

digitalWrite(dplPin, Xbox.getButtonPress(LEFT) ? LOW : HIGH);

///////////////////////////////////D Pad UP//////////////////



///////////////////////////////////D Pad DOWN//////////////////




///////////////////////////////////A Button///////////////////

digitalWrite(crossPin, Xbox.getButtonPress(A) ? LOW : HIGH);

//////////////////////////////////B Button///////////////////

digitalWrite(circlePin, Xbox.getButtonPress(B) ? LOW : HIGH);

//////////////////////////////////Y Button///////////////////

digitalWrite(hwb, Xbox.getButtonPress(Y) ? LOW : HIGH);


       }else{

    digitalWrite(Second_LeftPin, LOW);
    digitalWrite(Second_RightPin, LOW);
    digitalWrite(First_LeftPin, LOW);
    digitalWrite(First_RightPin, LOW);
    digitalWrite(lasuPin, LOW);
    digitalWrite(lasdPin, LOW);
    digitalWrite(raslPin, LOW);
    digitalWrite(rasrPin, LOW);
    digitalWrite(dprPin, LOW);
    digitalWrite(dplPin, LOW);
    digitalWrite(crossPin, LOW);
    digitalWrite(circlePin, LOW);
    digitalWrite(hwb, LOW);
  
    
    


}

  }
}

as you can see from my above code what im trying to do is, that once y is clicked both circlePin pin and hwb pin should equal LOW. right now both of them work separately but i need them to turn off at the same time (Y clicked), however i still need the circlePin to work separately away from the Y function

im sorry if this isnt making much sense im trying to phrase it the best i can

thank you

Maybe I misread it, but this seems like a no-brainer.

Use a simple IF statement to see if the Y button is pressed and if so, digitalWrite(circlePin, LOW); digitalWrite(hwb, LOW);

HazardsMind:
Maybe I misread it, but this seems like a no-brainer.

Use a simple IF statement to see if the Y button is pressed and if so, digitalWrite(circlePin, LOW); digitalWrite(hwb, LOW);

i have tried that but it hasn’t worked when i click Y both go off which is good but then B stops working again im so stumped here is the code with the if statement

#include <XBOXRECV.h>
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif

USB Usb;
XBOXRECV Xbox(&Usb);

int circlePin = 18;
int hwb = 19;

void setup(){
  Serial.begin(115200);
 pinMode(circlePin, OUTPUT);
 pinMode(hwb, OUTPUT);
 
  
  while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
  if (Usb.Init() == -1) {
    Serial.print(F("\r\nOSC did not start"));
    while (1); //halt
  }
  Serial.print(F("\r\nXbox Wireless Receiver Library Started"));
}

void loop() {
  Usb.Task();
    for (uint8_t i = 0; i < 4; i++) {
       if (Xbox.XboxReceiverConnected && Xbox.Xbox360Connected[i]){
         
//////////////////////////////////////

     if (Xbox.getButtonPress(B, i)){
   
       digitalWrite(circlePin, LOW);
   
     }    
/////////////////////////////////////    


     if (Xbox.getButtonPress(Y, i)){
   
       digitalWrite(circlePin, LOW);
       digitalWrite(hwb, LOW);
   
     }    
/////////////////////////////////////
  else{
           
            digitalWrite(circlePin, HIGH);
            digitalWrite(hwb, HIGH);
           
         }
////////////////////////////////////     
      
         
}
}
}

im not sure if it is a issue with the loop but if anyone can help me that would be great

thank you

are you using a blue tooth module to recieve the signal?