Connect digital PWM to Analog in


I have a quick question,
I’m operating a laser-pointer with my arduino and I want to indicate the following states with LEDs:

(setup: analogWrite(Laser, 12 or so);

Laser is on: I take that by reading the PWM value I’m writing to it.
Laser is off: same as above
Laser is not plugged in!: by wiring the laser digital out to the analog in using a 10kohm resistor I can read the analogport giving random numbers(not plugged), or zero’s(plugged).
BUT idealy I want to read the “power” thats written to the Laser so I suggest using a condensator for smoothing the PWM output and a resistor preventing a short.

Well no idea what kind of resistor/condensator would be best.

other suggestions to solve this also welcome :slight_smile:

Best regards, Jazzar.