Go Down

Topic: Brand New Arduino Ethernet Analog Pins (Read 1 time) previous topic - next topic

AWOL

Code: [Select]
if (anHeight>analogRead(an)>anLow){
Are you aware of the left-to-right evaluation rule?
Should there be two comparisons and an "&&" there instead?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

myDuino

It works like this too.. But not this is the question.

zoomkat


Ok thank you for the adveices, I will coretct the fails, but now i don't know how can I measure the 0 volt (standby state of alarm zone response led)


If you are getting random voltages when the alarm output is 0, add a high value pull down resistor (maybe 50k or 100k) with one end of the resistor connected between the alarm output and the arduino analog input pin, and the other end of the resistor connected to the arduino ground.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Nick Gammon

Quote

    if (anHeight>analogRead(an)>anLow){



It works like this too.. But not this is the question.


It should be. That won't do what it looks to you like it is doing. Fix it, I suggest.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up