- 1.Turn on Glint’s Lights
- 2. Motion Detection
- 3. Varied Lighting Animations
- 3.1 On start, Glint’s lights are off. When button is pressed, Glint can turn on its lights one by one automatically.
- 3.2 Count down—Turn off Glint’s lights one by one. On start, Glint’s pre-set 12-color lights are on; when button is pressed, Glint turns off one light per second automatically until all lights are off.
- 4. Stage Interaction
1.Turn on Glint’s Lights
We can use the blocks in the block menu “Lights” to set various lighting animations for Glint.
Some of the Case:
1.1 Set lights to pre-set 12 colors
1.2 Modify the brightness and color of each light
Click the block “pre-set 12 colors” o enter to the page below. We can modify the brightness and color of each light in this page.
1.3 Set lights to pre-set 12 colors and change how long the light can stay on
Time on the block can be changed as required. The lights will be on for n seconds as it is set to be n seconds.
1.4 Set Glint to blink red lights
The speed and light color on the block are optional. Combined with the block “repeat”, it can make Glint repeat the lighting animation.
1.5 Turn Lights Off
This block can turn all lights on Glint off.
2. Motion Detection
Three-axis accelerometer inside Glint can detect its pose, event shake and event pow.
2.1 Event Shake Detection
In the block menu “Events”, this block is the basis of performing the follow-up operations when Glint is shook.
Case:
2.2 Event Pow Detection
In the block menu “Events”, this block is the basis of performing the follow-up operations when pow.
Case:
2.3 Pose Detection
In the block menu “Sensor”, the following blocks can detect Glint’s poses, including its statuses of facing up, facing down, facing left, facing right, facing forward, facing backward.
Case:
On start,repeat the lighting animation that if Glint is facing up, then its pre-set 12-color lights will be on; if Glint is facing down, then the red-lights will be on for 2 seconds.
3. Varied Lighting Animations
3.1 On start, Glint’s lights are off. When button is pressed, Glint can turn on its lights one by one automatically.
Here we need to make variables. Select “Make a new Variable” in the block menu “Variables” and name it.
3.2 Count down—Turn off Glint’s lights one by one. On start, Glint’s pre-set 12-color lights are on; when button is pressed, Glint turns off one light per second automatically until all lights are off.
Varied lighting animations can be made through push button, pow, shake or pose.
4. Stage Interaction
Glint can enable the interaction with stage sprites.
4.1 When button is pressed, Dr. Owl on the stage moves 10 steps and says”Hello!”.
Turn on”on-line debugging” in device mode, a new block”Message”will appear then. Code Glint. Click the programmed block to make it has a yellow frame, meaning the program is running.
Switch to Stage mode. Code stage sprites. Operate Glint according to the program.
Note: The name of broadcast message should be in line with that of the receive message.