Energy Ring

 

Shake your hand to power Halocode. As Halocode is "charging", more LEDs will light up

1.png

 

1. Choose Variables block, and click "Make a Variable". Name the variable "n"

2.gif

 

2. Add an Events block when button is pressed, a Lighting block light off LED (), and a Variables block set (n) to (). Input "1"

3.gif

 

3. Add a Control block if () then (), an Operators block () > (), and a Sensing block shaking strength. Input "20"

4.gif

 

4. Add a Lighting block light up LED () with color R()G()B(), two Variables block n and change (n) by (1), a Control block wait () secs. Input "0.2"

5.gif

 

5. Add a Control block repeat until (), an Operators block () = (), a Variables block n. Input "12"

6.gif

 

6. Add a Lighting block all LEDs light up (). Set the color to blue

7.gif

 

7. Toggle on Upload mode.

Download code


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

Comments

0 comments

Please sign in to leave a comment.