while(girl==ugly){ drink++;
}
if ((val >= 3) && (val <=5)) {
Serial.print("Within range");
} else { Serial.print("outside of range"); }
Something like
IF analog.Read1 > 3 AND analog.Read1 < 5 THEN ...
Opps, forgot the equal part.. Rudolph didn't though.
maybe-semi-pseudo-code (don't recall analogRead() syntax right now)
int val = analogRead(pinNumber);
if((val >= 3) && (val <= 5)){
// val is 3 or 4 or 5
edit = oops, I think it's "&&", not "and"
Search page
@ Tue, 2009-03-31 11:38
...
while(girl==ugly){
drink++;
}
@ Mon, 2009-03-30 23:30
Try this
if ((val >= 3) && (val <=5)) {
Serial.print("Within range");
}
else {
Serial.print("outside of range");
}
@ Mon, 2009-03-30 23:22
AND?
Something like
IF analog.Read1 > 3 AND analog.Read1 < 5 THEN ...
Opps, forgot the equal part.. Rudolph didn't though.
@ Mon, 2009-03-30 23:20
maybe-semi-pseudo-code
maybe-semi-pseudo-code (don't recall analogRead() syntax right now)
int val = analogRead(pinNumber);
if((val >= 3) && (val <= 5)){
// val is 3 or 4 or 5
}
edit = oops, I think it's "&&", not "and"