Events

1. when Codey starts up

When Codey starts up, run the script.

Example:

When Codey starts up, the screen will display "hello".

2. when button () is pressed

When the specified button is pressed, run the script.

Example:

When Button A is pressed, Codey will play the sound "hello".

3. when Codey is shaking

When Codey is shaking, run the script.

Example:

When being shaken, Codey will play the sound "wow".

4. when Codey is () tilted

If Codey tilts towards the specified direction, run the script. There are four options: "tilted to the left", "tilted to the right", "ears up", and "ears down".

Example:

When Codey is left-tilted, the screen will display "left".

5. when () > ()

When the value of the specified parameter (loudness or timer) is greater than the specified value, run the script.

Example:

When the loudness detected is greater than 10, Codey's screen will display current loudness.

6. when light intensity < ()

When detected light intensity is less than the specified value, run the script.

Example:

When the light intensity detected is less than 10, Codey's LED will light up red.

7. when I receive ()

When Codey receives specified message, run the script.

Example:

When receiving "message1", Codey will play the sound "laugh".

8. broadcast ()

Broadcast specified message.

Example:

Press Button A. Codey will broadcast "message 1".

Last updated