Events

 

1. when Halocode starts up

When Halocode starts up, run the script.

1.png

 

Example:

2.png

When Halocode starts up, the LED animation "spindrift" will be played.


2. when button is pressed

When the button is pressed, run the script.

3.png

 

Example:

4.png

When the button is pressed, all the LEDs will light up green.


3. when Halocode is shaking

When Halocode is being shaken, run the script.

5.png

 

Example:

6.png

When Halocode is being shaken, all the LEDs will light up green.


4. when Halocode is ()

When Halocode is placed in the specified position, run the script. There are four options: "arrow-up", "arrow-down", "left-tilted", and "right-tilted".

7.png

 

Example:

8.png

When Halocode is placed arrow-up, all the LEDs will light up green.


5. when touchpad () is touched

When the specified touchpad (0, 1, 2, 3) is touched, run the script.

9.png

 

Example:

0.png

When touchpad0 is touched, the LED animation "meteor" will be played.


6. when () > ()

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

00.png

 

Example:

01.png

When the timer value is greater than 360 seconds, the timer will be reset.


7. when I receive ()

When the specified message is received, run the script.

02.png

 

Example:

03.png

When Halocode receives "message1", the LED animation "rainbow" will be played.


8. broadcast ()

Broadcast the specified message.

000.png

 

Example:

111.png

When the button is pressed, Halocode will broadcast "message1".


Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.