A wiser solution I'd say, is to wire the pot to an analog input and the led to a pwm pin, with resistor. Then analogRead() the pot, and divide that by 4 on the way to an analogWrite().
A wiser solution I'd say, is to wire the pot to an analog input and the led to a pwm pin, with resistor. Then analogRead() the pot, and divide that by 4 on the way to an analogWrite().