use 3.2V LED by analog output???

Hello
I'm not very well known about pwm
but i assume pwm is controlling voltage amount 0~5V by 0~255
then could I turn on the LED which peak at 3.2V
by controlling pwm?

If I use digital output i should use resistor....right?

please help me :slight_smile:

No, that is not what happens. The function name "analogWrite" is misleading. In reality it is a pulse width modulated (pwm) 5V signal. So you can use your led with an appropriate value series resistor calculated for a 5V source.

PaulRB:
No, that is not what happens. The function name "analogWrite" is misleading. In reality it is a pulse width modulated (pwm) 5V signal. So you can use your led with an appropriate value series resistor calculated for a 5V source.

thanks for your advice!!

Read this all about PWM it will help you understand what is going on:-
http://www.thebox.myzen.co.uk/Tutorial/PWM.html

If I use digital output i should use resistor....right?

You always need a resistor, or some other current limiting circuit with an LED, you can not just use an LED without.
Here is why:- http://www.thebox.myzen.co.uk/Tutorial/LEDs.html