Analod powering LED

Can an analog pin make an led flash? If so can someone get me a small code chunk that will make it work on a button press?

 void button_ButtonPressed(GTM.GHIElectronics.Button sender, GTM.GHIElectronics.Button.ButtonState state)
        {
            AnalogOutput an = new AnalogOutput(Cpu.AnalogOutputChannel.ANALOG_OUTPUT_0);
            an.Scale = 1;
            an.Write(1);

        }

Is this code good? My led isn’t turning on, so I want to know what you think.

you need to check the manual for the chip to see if the analog port supplies enough current to light an led. I doubt it does.

Also your pin is getting disposed when you exit the event. Declare it outside as a static.

the best way to set an LED with a Analog brightness is with a PWM port.