Hello

I have Sainsmart's 3.2" display. It's nice but I can't adjust the backlight with code, only manually with the trimmer pot, that is located on the "adapter shield".
The backlight is made of 5 (not sure) LEDs which are controlled by the trimmer pot, which is wired on the 3.3v pin of the Arduino Mega. I have no idea about current required for those LEDs (I have a multimeter, but can't measure because I can't place the sensors, I first need some male-female wires...) but it shouldn't be more than 40mA since it's the max current that can be drawn from the 3.3v pin.
So I thought I could maybe desolder and remove the trimmer pot, and solder a wire where the trimmer pot's output was (the middle pad), to the Arduino pin 8 (or any other PWM pin), with maybe a resistor in between. So I could control the brightness with analogWrite. A picture is worth 100 words:

So before I try and fry my Arduino or the display, or both...few questions

1) Will it work at all? If not, please tell me why.
2) Do I really need a resistor, if I use this code (obviously not tested, and I'm planning to use the SoftPWM library anyway):
#define PIN_BACKLIGHT 8
void SetBacklightPercent(int percent)
{
if (percent > 100)
percent = 100;
else if (percent < 0)
percent = 0;
//(3.3v/5v) * 255 = 168.3
analogWrite(PIN_BACKLIGHT, (int) round(168.3 * (percent/100.0)));
}
void setup()
{
pinMode(PIN_BACKLIGHT, OUTPUT);
}
void loop()
{
SetBacklightPercent(100);
delay(1000);
SetBacklightPercent(50);
delay(1000);
SetBacklightPercent(0);
delay(1000);
}
3) Do you have a better solution, which could possibly avoid to desolder the trimmer pot?
Thanks in advance!