Some ideas to show how easy it is to do digital output and then analog input and output:
Start with the simple 'hello world' blink sketch (with the led on a pwm pin).
Then change the blink delay so its mapped to an analog input - the blink rate changes depending on a sensor (say a light dependent resistor) .
Then change the digitalWrite to analogWrite (using map of the sensor value) so the intensity of the LED also depends on the sensor.