I would like to know if it is possible to control two leds separately using a single comparator output. ie above a certain voltage a green led is on and a red is off, below a certain voltage, the green led is off and the red is on.
Voidugu:
I would like to know if it is possible to control two leds separately using a single comparator output. ie above a certain voltage a green led is on and a red is off, below a certain voltage, the green led is off and the red is on.
Where is this variable voltage coming from?
If it is the analogWrite command be aware that this does not output a variable voltage but a pulse width modulated signal. You need a filter to make that an analogue voltage. http://www.thebox.myzen.co.uk/Tutorial/PWM.html