# TWELITE STAGE によるアクトの実行

TWE:LITE STAGE を用いると、ビルドと実行を簡単に行えます。ビルド→プログラマの起動→書き込み→ターミナルの起動といった一連の動作を簡単な選択操作で実行できます。

### 1. TWELITE STAGE の起動

事前にTWELITE RやMONOSTICKを接続しておきます。TWELITE STAGE アプリを起動します。

{% embed url="<https://stage.twelite.info/usage/screens>" %}

### 2. シリアルポートの選択

TWELITE が接続されていれば、対応するシリアルポートが表示されます。選択してください。

{% embed url="<https://stage.twelite.info/usage/screens/serial_port_sel>" %}

{% hint style="info" %}
ここで選択しなくても Alt(Cmd)+0,1,2... の操作によりシリアルポートのオープン、クローズはいつでも可能です。
{% endhint %}

### 3. アプリ書換メニューを選択

アプリ書換メニューを選択します。TWELITEが接続されていない場合はエラーになります。その場合は接続を確認の上、改めてシリアルポートをオープンしてください。

{% embed url="<https://stage.twelite.info/usage/screens/main_menu/firm_prog>" %}

アプリ書換メニューにはいくつかのサブメニューがあります。

* [BINから選択](https://stage.twelite.info/usage/screens/main_menu/firm_prog/bin) → ビルド済みのファイルを選択して書き込む
* [Actビルド＆書換](https://stage.twelite.info/usage/screens/main_menu/firm_prog/act_build) → Actのサンプル集から選択して書き込む
* [TWELITE APPS ビルド＆書換](https://stage.twelite.info/usage/screens/main_menu/firm_prog/tweapps_build) → TWELITE APPS (ビルド済みのレディメードアプリ) から選択して書き込む
* [Actエクストラ](https://stage.twelite.info/usage/screens/main_menu/firm_prog/act_extras_build) → Actのその他のアプリ

### 4. 書換メニューを選択

ここではメニューから「Actビルド＆書換」を選択します。

{% embed url="<https://stage.twelite.info/usage/screens/main_menu/firm_prog/act_build>" %}

このメニューを開くと、`MWSTAGE/MWSDK/Act_samples`にあるサンプル一覧が表示されます。

ビルドしたい対象を選択します。

{% embed url="<https://stage.twelite.info/usage/screens/main_menu/firm_prog/build_screen>" %}

選択後、ビルドと書き込みが自動で行われ、ビルド終了後に「インタラクティブモード操作画面」に遷移します。Actのサンプルのほとんどが、インタラクティブモードを持ちませんが、この画面はターミナル操作の替わりにも利用できます。

{% hint style="info" %}
[TWELITE STAGE アプリの設定](https://stage.twelite.info/usage/screens/main_menu/settings)により、書き込み終了後の画面をターミナルに設定することも可能です。
{% endhint %}


---

# Agent Instructions: 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://mwx.twelite.info/v0.1.7/install_n_build/run-act-stage.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.
