Problem making a logitech g29 pedal adapter with arduino pro micro

Hi all, I followed amstudio’s youtube video on making the logitech g29 pedals USB stand alone.

For this project I connected wires to a db9 connector. I took the throttle signal wire and solder it to A2 on the arduino, the brake signal wire to A1, the clutch signal wire to A0 as well as ground and the 5v to the ground and 5v pins on the arduino. I uploaded the follow code to the arduino.

// USB 5 AXIS Controller 
// Use with Arduino Leonardo or ProMicro.
// Install Joystick library

// AMSTUDIO 2018
// YT
// Wiring + Setup
// Copyright _ Non Commerical_ Not for Resale 

#include <Joystick.h>

Joystick_ Joystick;
int RyAxis_ = 0;  
int RzAxis_ = 0;          
int Throttle_ = 0;         

const bool initAutoSendState = true; 

void setup()
void loop(){
 RyAxis_ = analogRead(A0);
 RyAxis_ = map(RyAxis_,0,1023,0,255);

 RzAxis_ = analogRead(A1);
 RzAxis_ = map(RzAxis_,1023,0,255,0);            
Throttle_ = analogRead(A2);
Throttle_ = map(Throttle_,1023,0,255,0);         
delay (50);

//AMSTUDIO Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

I then went into the setup a game controller on windows to calibrate everything. It looked all good from the calibration screen. However when I go into the sim in this case iRacing the brake pedal flickers on and off a little bit. The pedals work when normally plugged into the wheel. It only happens to just the brake pedal. I checked my soldering to make sure there wasn’t a bad connection anywhere and tried 3 different pedal sets to rule out a fault in the pedals. I am not sure what is causing this flickering. Does anyone have any idea? Thanks