Hi. I have a question regarding programming the analog output pin on an arduino uno R3. I have a speaker that has a maximum power rating of 0.2W. This is about ~2.5V max. This voltage needs to be an AC signal and I would like to power the speaker through one of the analog pins on the R3.
I would like to send an AC signal through pin 4.
To get the 2.5V, I would need to have the correct resistor(s) between the output pin and speaker. Or is there a way to have the AC signal vary the voltage to a max value of 2.5V?
Inside my function, this is what I currently have: analogWrite(A4, Value);
I am unsure what to put for "Value." I read that "value: the duty cycle: between 0 (always off) and 255 (always on)." What is the meaning of these values?