Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
As you have an ADC you may as well use it.
Mike.
The problem with using the comparator is that there is only one and three voltages (levels) to monitor. With the ADC you can just let it run, go off and do something else and when you return it's got the reading ready.
It's not actually clear what Suraj wants,
Is it,
less than 3V =red
3V to 4V = yellow
greater than 4V = green
Mike.
12 2.5
13 2.708333333
14 2.916666667
15 3.125
16 3.333333333
17 3.541666667
18 3.75
19 3.958333333
20 4.166666667
21 4.375