Energy Ring

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

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

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. Add a Control block if () then (), an Operators block () > (), and a Sensing block shaking strength. Input "20"

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. Add a Control block repeat until (), an Operators block () = (), a Variables block n. Input "12"

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

7. Toggle on Upload mode.

Download code


results matching ""

    No results matching ""