Components Required

Image Component Quantity Available in Kit
evive 1
USB A-B Cable 1

Introduction

While loops will loop continuously, and infinitely, until the expression inside the parenthesis, () becomes false. Something must change the tested variable inside to body of while loop, or the while loop will never exit. When you don’t know how many time the loop should execute, you should go fo a while loop.

Structure

while (condition) {
Body of while loop
}

The flow chart of for while execution is given below:

Example:

Arduino IDE for Loop