Re: What am I missing?

Unless shorted to ground, the chances of an analogRead returning zero are fairly slight.

Posted by: Groove Posted on: Today at 20:20:20 Unless shorted to ground, the chances of an analogRead returning zero are fairly slight.

the "Zero" is around 2.5V and the sensor swing form 2.5-5 0r 2.5-0. Thats not the problem the PB works but the While Zero doesn't the start state of Zero Var is zero i haven't read it yet. it should wait till the PB is pressed

I have deleted the code around this to keep it simple

I don't understand why this works Waiting for the switch to go low

What switch? Define "works".

Looking for a way to "move" around in the code

What does that mean?

if (ZeroPB == HIGH)[glow];[/glow] {

Bad. Very bad.

I fixed it I didn't realize the states from the last reads where still there. Make sense Thats what it was the last read and they will not change till the next time its read

thanks of the replies ;)

I'm glad you fixed it, but deleting your posts won't help any else with the same or similar problem.

@nnimcmj Please don't delete previous posts, however embarrassing they may look. Others may search the forum for problems and be unable to follow this now broken thread.