Arduino Programming Language: DoWhile

Name

do... while

Description

The do loop works like the while loop, but the condition is tested at the end of the loop, so the do loop will always run at least once.

Syntax

do{
//statement
}while(test condition);

Parameters

test condition: is a boolean statement that evaluates to true or false.

Usage

Application

Examples

do{
delay(10);
x=readSensor();
}while(x<50);


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc