pdf-icon

if

API

if judgment block, according to the judgment condition is valid or not, will decide whether to run the program, or according to the situation to choose to run a different program.

if If the condition is valid, the right-hand side of Do is executed when it is valid.

if else Determine whether the condition is valid or not, if it is valid, execute Do right program, if it is not valid, execute else right program.

true Boolean value can replace the judgment conditions of the formula, set to true for the establishment, set false for not established

Usage

Add if Block to the program, add judgment conditions, add conditions are established, and not established when the execution of the program, for example: when the M5GO stand light up the RGB bar.

Logic

API

Logical relations are often used as judgment conditions in if-judgment, whether the data relationship between the two sides of the operation is correct or not, and finally come up with two values of true or false, which are used as if-judgment.

Usage

Use data to establish a relationship, and connect to if Block as a judgment condition, for example: when the gyroscope X coordinate is greater than 90, light up the RGB bar.

logic operation

API

Performs the logical operation "and, or, not" on two logical relations.

and The result of a logical operation is True when both the left and right logical relations `are valid', otherwise it is False.

or The result of the logical operation is True when one of the two logical relations `is valid', otherwise it is False.

not Reverse the logical result of an equation, i.e. notTrue=False, notFalse=True.

Usage

Add the relations that need to perform logical operations to both sides, and modify the operation types.

On This Page