03.Control - mixly/Mixly_Arduino GitHub Wiki
In this part, Mixly provides blocks that you can control the executive structure.
Setup
The contents in Setup block can only be executed once. Therefore, we often put the variables' declaration or definition of function into set up block.
DELAY
You can use the delay block to delay sometime. The unit is millisecond(ms).
IF and SWITCH
In mixly, there are two conditional statement, one is IF-ELSE, another is SWITCH. IF-ELSE: first, we will judge whether satisfy the condition in IF sentence. If TRUE, do a series of instructions. If false, do another aeries of instructions.
Click the blue button, you can add ELSE sentence.
LOOP
Mixly provides three kinds of loop structure:FOR, WHILE, DO WHILE, which is the same as language C. The function of loop structure is to execute some code repeatedly.
FOR:using a count variable i from a to b, when the loop finish once, i=i+step. when i>b, break the loop.
WHILE:If satisfy the condition, do repeatedly until the condition returns false, then will break the loop.
DO-WHILE:First, do the sentence, and then judge whether satisfy the condition. If TRUE, do repeatedly, otherwise, break.
SYSTEM RUNNING TIME
You can use this block to read the system running time from the program running.