the logic block
Many of the programs presented so far make decisions using the program flow blocks, the sensor blocks, and the Compare block. These decisions involve a single condition, usually comparing the value from a sensor to a target value, with the result (either true or false) used in a Switch or Loop block. To put it another way, the programs are asking simple questions like “Is the Touch Sensor pressed?” or “Is the reading from the Light Sensor less than 50?”
The Logic block lets you combine multiple conditions, allowing your program to make more complex decisions. This lets your program ask questions like “Is the Touch Sensor pressed and the Light Sensor reading greater than 50?”
You can find the Logic block with the other math-related ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access