Use compound statements to synchronize multiple outputs.
• | Control multiple devices in a single command using “AND” |
• | Example activity: Traffic light simulation with sound warnings |
- | Examples: |
SET COLOR 255 0 255 AND SOUND 440 TIME 2
SET POWER 100 AND SOUND 880
Example:
Sync LIGHT/COLOR with SOUND to simulate traffic signal
Code |
SET SOUND 440 TIME 2 AND COLOR 255 0 255 TIME 2 |
A maximum of four output devices can be included in a single command.
The total length of the command cannot exceed 96 characters.
The commands will start at the same time but can finish independently.
Example:
Code |
SET SOUND 440 TIME 2 AND COLOR 255 0 255 TIME 4 |