This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
docs:blox:examples-logic [2024/08/19 20:21] admin |
docs:blox:examples-logic [2024/08/19 20:45] (current) admin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== 6.2 BLOX: Logic and Events ====== | + | ====== 6.2 BLOX: Events |
| Using BLOX to build firmware is like piecing together a puzzle where each piece represents a different action or decision your device needs to make. Here’s a simple way to understand it: | Using BLOX to build firmware is like piecing together a puzzle where each piece represents a different action or decision your device needs to make. Here’s a simple way to understand it: | ||
| Line 15: | Line 15: | ||
| * A " | * A " | ||
| * Sometimes, you want your robot to make decisions. For example, "If there' | * Sometimes, you want your robot to make decisions. For example, "If there' | ||
| - | * In Blockly, you can use logic blocks like " | + | * In BLOX, you can use logic blocks like " |
| - | * If you'd like the device | + | * If you'd like the device |
| * There are many more examples | * There are many more examples | ||
| Line 30: | Line 30: | ||
| | \\ - Set both LEDs to RED \\ - Wait for 1 second \\ - Set both LEDs to GREEN \\ - wait for 1 second \\ - Set both LEDs to BLUE \\ - wait for 1 second \\ - Then repeat (the pattern will run over and over)| | | \\ - Set both LEDs to RED \\ - Wait for 1 second \\ - Set both LEDs to GREEN \\ - wait for 1 second \\ - Set both LEDs to BLUE \\ - wait for 1 second \\ - Then repeat (the pattern will run over and over)| | ||
| - | It's really that easy! You can substitute the LEDs for any other output and already | + | It's really that easy! You can substitute the LEDs for any other output and already |
| - | ===== 6.2.4 Control flow of Instructions using an IF block ===== | + | ===== 6.2.4 Control flow of Instructions using a Logic block ===== |
| **Let' | **Let' | ||