Controlling screen with PWM

Im looking at controlling my screen backlight with RD so when the headlights turn on it dims the screen. My screen has the option to use PWM to control the screen brightness using raspberry pi pins. Does anyone know how to set this up in RD?

This is from the manufacture.

"As shown below, first remove the original soldered resistor (shown in the red box), and then connect the lower pad of that resistor (shown in the yellow circle) to the P1 pin of the Raspberry Pi, then you can use GPIO to control the backlight.

  • gpio -g pwm 18 0
  • gpio -g mode 18 pwm (Occupied pins are PWM pins)
  • gpio pwmc 1000
  • Brightness control:
  • gpio -g pwm 18 X (X takes values between 0 and 1024, with 0 being the darkest and 1024 being the brightest.) "