- Arduino Tutorial
- Arduino - Home
- Arduino - Overview
- Arduino - Board Description
- Arduino - Installation
- Arduino - Program Structure
- Arduino - Data Types
- Arduino - Variables & Constants
- Arduino - Operators
- Arduino - Control Statements
- Arduino - Loops
- Arduino - Functions
- Arduino - Strings
- Arduino - String Object
- Arduino - Time
- Arduino - Arrays
- Arduino Function Libraries
- Arduino - I/O Functions
- Arduino - Advanced I/O Function
- Arduino - Character Functions
- Arduino - Math Library
- Arduino - Trigonometric Functions
- Arduino Advanced
- Arduino - Due & Zero
- Arduino - Pulse Width Modulation
- Arduino - Random Numbers
- Arduino - Interrupts
- Arduino - Communication
- Arduino - Inter Integrated Circuit
- Arduino - Serial Peripheral Interface
- Arduino Projects
- Arduino - Blinking LED
- Arduino - Fading LED
- Arduino - Reading Analog Voltage
- Arduino - LED Bar Graph
- Arduino - Keyboard Logout
- Arduino - Keyboard Message
- Arduino - Mouse Button Control
- Arduino - Keyboard Serial
- Arduino Sensors
- Arduino - Humidity Sensor
- Arduino - Temperature Sensor
- Arduino - Water Detector / Sensor
- Arduino - PIR Sensor
- Arduino - Ultrasonic Sensor
- Arduino - Connecting Switch
- Motor Control
- Arduino - DC Motor
- Arduino - Servo Motor
- Arduino - Stepper Motor
- Arduino And Sound
- Arduino - Tone Library
- Arduino - Wireless Communication
- Arduino - Network Communication
- Arduino Useful Resources
- Arduino - Quick Guide
- Arduino - Useful Resources
- Arduino - Discussion
Arduino - do…while loop
The do…while loop is similar to the while loop. In the while loop, the loop-continuation condition is tested at the beginning of the loop before performed the body of the loop. The do…while statement tests the loop-continuation condition after performed the loop body. Therefore, the loop body will be executed at least once.
When a do…while terminates, execution continues with the statement after the while clause. It is not necessary to use braces in the do…while statement if there is only one statement in the body. However, the braces are usually included to avoid confusion between the while and do…while statements.
do…while loop Syntax
do { Block of statements; } while (expression);
arduino_loops.htm
Advertisements