Can I use analog pins(A0,A1, ...) as analog outputs???

I tried using "analogWrite(A0,100)" function on my Arduino Uno but it doesn't output anything.My question is: Can analog pins(A0,A1, ...) be used as the analog output pins? I know they can be used as digital outputs, but i'm interested in analog signal.

As far as I know, you need to use PWM Pins for analog Output.

Analogue input only (assuming Uno).

And the six analogue outputs are not analogue either, but PWM.
Leo..

Thanks

Sip_:
I tried using “analogWrite(A0,100)” function on my Arduino Uno but it doesn’t output anything

It should output a LOW, and analogWrite(A0, 255); should output a HIGH.

Sip_:
...but i'm interested in analog signal.

You need to read about PWM and understand that is it not "ready-to-use" analog level signal at all.

What is your goal with analog signal? You are going to need extra components to get something like we normally consider as analog signal.

Cheers,
Kari

I just want to make a diode dimmer using A# pins.I also understand how PWM pins work.

PWM pins on UNO are 3, 5, 6, 9, 10, 11, they have a " ~ " symbol beside the pin number.
https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/

Sip_:
I just want to make a diode dimmer using A# pins.I also understand how PWM pins work.

Very good. You just mentioned analog signal, which I think PWM is not.

Cheers,
Kari

You can do software PWM on these pins. However, it's inferior to doing hardware PWM on the pins that support it. If you do want to use software PWM, I recommend this library:

PWM is the way to dim an LED. Simply lowering the voltage (which a true analog output would do) doesn't work well on an LED.

Sometimes I get the feeling that we are not reading other people posts before posting our own answers or suggestions.

OP didn't mention LED (diode) until... when?

I can't be sure anymore who is answering to who, or is it just nice to be heard?
:smiley:

But, most important thing is that OP get the answer, so his "I just want to make a diode dimmer using A# pins." is still wrong. You can't do that with A# pins.

Cheers,
Kari