> For the complete documentation index, see [llms.txt](https://learn.pakronics.com.au/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.pakronics.com.au/halocode-1/code-with-mu-a-simple-python-editor/examples/basic-project/energy-ring.md).

# Energy Ring

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

![](/files/-Lpg6_aHdnxAqK_g_StU)

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

![](/files/-Lpg6_aIKUEqqHMWSrnF)

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

![](/files/-Lpg6_aJSXOEFXcFTEyi)

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

![](/files/-Lpg6_aKmiRN_ls4U4wI)

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"

![](/files/-Lpg6_aLHM-Y72_NvLta)

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

![](/files/-Lpg6_aMhUuztMsXSkL0)

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

![](/files/-Lpg6_aN19ecq7l8jFnT)

7\. Toggle on Upload mode.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.pakronics.com.au/halocode-1/code-with-mu-a-simple-python-editor/examples/basic-project/energy-ring.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
