Arduino IDE: while Loop
While loops execute a statement, or a group of statements continuously, and infinitely, until the expression inside the parenthesis, () results in false. Something must change the tested variable inside the body of while loop, or the control of the program will never exit the while loop. When you don’t know how many time the loop should execute, you should go for a while loop.
The following example shows the general while loop syntax in Arduino IDE. The control expression, i.e. the condition is written inside the parentheses. Unlike the for loop, the while loop has only one expression within its parentheses, and the looping behaviour depends on the activity inside the loop’s body.
Below is the flowchart showing how a while loop works:
How to Install a Library in Arduino IDE
In This Arduino install library tutorial discusses how to add library to Arduino download and install the library to Arduino, what is are libraries, how to install them and include them in Arduino IDE sketches. Arduino library download instructions are also given for the reference.