> For the complete documentation index, see [llms.txt](https://nkust.gitbook.io/halocode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nkust.gitbook.io/halocode/master.md).

# HaloCode光環板簡介

自從micro:bit開始流行起來之後，漸漸地許多廠家也開始研發類似和相容的板子，而HaloCode是其中的佼佼者，價錢差不多，功能各有所長，以下的連結可以看到HaloCode這塊板子的功能以及規格方面的詳細介紹：

{% embed url="<http://ipoemaker.com/5001551>" %}

它的大小和micro:bit差不多，不過在外觀上最大的差異是HaloCode只有一個按鈕和12個LED燈，但是雖然只有12顆LED，但是當你一把HaloCode接上電源時一定對這12顆LED大為驚艷，因為它們全具有全彩高亮度功能，質感非常好喔。先來看看示範程式（這塊板子可以使用積木和Python編寫程式，但是何老師還是喜歡使用Python啦）：

```python
import event, halo
import random
index = 0

@event.button_pressed
def on_start():
    global index
    index = 1
    old_index = 1
    init_delay = 0.01
    while True:
        halo.led.show_single(old_index, 0, 0, 0)
        halo.led.show_single(index, 255, 255, 0)
        old_index = index
        index = index + 1
        if index > 12:
            index = 1
        time.sleep(init_delay)
        init_delay += 0.01
        if init_delay > 0.5 and random.randint(1, 10) == 1:
            break
```

以下是執行的結果示範影片：

{% embed url="<https://www.youtube.com/watch?v=w1OcPc-UrUM>" %}


---

# 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://nkust.gitbook.io/halocode/master.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.
