

However, I now need each count dependent on each other so I need them within the same loop. They make the program very powerful and be able to be used for a vast variety of purposes. They make it possible to test a variable against a value/compare a variable with another variable and make the program act in one way if the condition is met, and another if it isn't. As It's wrote below, the sketch is working perfectly, especially if considering the situation in which every function returns one single value. Introduction Conditional statements check whether a programmer-specified Boolean condition is true or false. In particular I've Imagined a sketch with a 'switch case loop' for the function selection.
ARDUINO WHILE LOOP MULTIPLE CONDITIONS CODE
This is happening in my code in two separate while loops. Hi, I would like to create a sketch that execute some different function (sensor measurements) depending on which key is pressed by user. The vectors that count are "count1" and "count2".

All they do is count in increments of 1 from 0 to either 10 or -10. Once the fadeValue variable reaches 255, it will then exit this loop because the condition fadeValue<255 becomes false.

while loops will loop continuously, and infinitely, until the expression inside the. Something must change the tested variable, or the while loop will never exit. Each time through the loop, the following condition is tested. Basically I have two while loops in my code. A while loop will loop continuously, and infinitely, until the expression inside the parenthesis, () becomes false.
