Compound Statements

New in Sketch v1.5

Use compound statements to synchronize multiple outputs.

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


TI-Basic Code Sample

Example:

Sync LIGHT/COLOR with SOUND to simulate traffic signal

Code
Sample:

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
Sample:

SET SOUND 440 TIME 2 AND COLOR 255 0 255 TIME 4