Go Down

Topic: Brand New Arduino Ethernet Analog Pins (Read 4006 times) previous topic - next topic


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 (who) 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.
I speak for myself, not Arduino.


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


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



    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