Read an analog input pin, map the result, and then use that data to dim or brighten an LED.