[Solved] Attack3 Joystick buttons to turn on LEDs on Arduino?

Thank you @quark, some progress here,

I edited this part of code


public void getUserInput() {

  joystickX = map(cont.getSlider("servoX").getValue(), 1, -1, 0, 150);
  joystickY = map(cont.getSlider("servoY").getValue(), -1, 1, 12, 180);
  but1 = cont.getButton("bn1").pressed();
  
  if (but1 == true) {
   
    arduino.digitalWrite(ledPin, Arduino.HIGH);
    println("button1 is pressed");
    
  }

When pressing the button, the serial monitor prints the message “button1 is pressed” meaning that the “if” part of code is working and I am entering it, but the led pin is never high meaning the code arduino.digitalWrite(ledPin, Arduino.HIGH); is not working somehow!
just to be clear I didn’t edit anything in the Firmata sketch uploaded to Arduino!