Hi all; I have included a while statement in my software.
while (a=1023){
a = analogRead(A0);
}
Serial.println(a);
What should be happening is while the analog read is 1023 you cannot exit the while statement which is what I want. The reading at AO is changing all the time but usually at a low. So what should be happening is that you get a print out of 'a' when exiting the while statement.
Higher up in the program the value of 'a' is shown. There is no print out of 'a'...
arduino 'while' statement
while (a=1023){
a = analogRead(A0);
}
Serial.println(a);
What should be happening is while the analog read is 1023 you cannot exit the while statement which is what I want. The reading at AO is changing all the time but usually at a low. So what should be happening is that you get a print out of 'a' when exiting the while statement.
Higher up in the program the value of 'a' is shown. There is no print out of 'a'...
arduino 'while' statement