after applied this code, my LED is always on. even if A0 touches ground, LED is still on.
my plan is to read A1 if it's high the led should on. if not, off.
Thanks in advance.
Also, you might want to use digitalRead instead of analogRead as the latter gives you a number in the range of 0 to 1024. Or compare analogeRead to a fix value like (f.e.) 512 instead of HIGH.