Loops can be used to rerun code untill a certain condition is met or indefinitely.
There are 3 types of loops in Arduino Programming
For loop
While loop
Do While loop
The initialization, condition and the increment are all defined on 1 line.
The initialization runs once when the loop is started.
The increment runs on every run.
The initialization and increment should be done mannually in the code.
The condition will be evaluvated in all runs.
The initialization and increment should be done mannually in the code.
The loop is executed the first time redardless whether the condition is true or false.
The condition will be evaluvated for the further runs.