> For the complete documentation index, see [llms.txt](https://mwx.twelite.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mwx.twelite.info/latest_en/api-reference/sys_callbacks/loop.md).

# loop()

This is the main loop of the application. After the loop ends, the CPU transitions to DOZE mode and waits for the next interrupt with low current consumption.

In the Act description, most of the processing is described in this loop.

{% hint style="info" %}
The back function definition is optional.
{% endhint %}
