# 使用方法

## 接続方法

{% hint style="warning" %}
必ずRaspberry Piの電源を切った状態で接続してください。
{% endhint %}

### 1. TWELITE STAGE HATにTWLITE DIP/PALを接続する

下図のようにTWELITEをTWELITE STAGE HATに接続します。

![](/files/-MT-FWY92Qf1DMV4C9lU)

{% hint style="warning" %}
TWELITEの向きを間違えると破損の原因になりますので、ご注意ください。
{% endhint %}

### 2. TWELITE STAGE HATをRaspberry Piに接続する

下図のようにTWELITE STAGE HATとRaspberry Piを接続します。

![](/files/-MT-FK6V4JAlQAHdrCMu)

{% hint style="info" %}
取付ネジはM2.5またはM2.6、スペーサーは11～11.5mmのものをご使用ください。(11mm推奨)
{% endhint %}

### 3. Raspberry Piの電源を投入する

Raspberry Piの電源コネクタに電源ケーブルを接続して、電源を投入してください。

### 4. TWELITE STAGE APPを起動する

{% hint style="info" %}
あらかじめTWELITE STAGE APPをインストールしておいてください。\
インストール方法は[こちら](https://stage.twelite.info/install/raspberrypi)をご覧ください。

使用方法は[こちら](https://stage.twelite.info/)をご覧ください。
{% endhint %}

TWELITE STAGE APPを起動し、シリアルポートの選択で "UART (serial0)" を選択してください。

## 配線

詳しい配線は[回路図](/mw-psd-sta-rpi-1/schematic.md)をご参照ください。

| TWELITEのDIO番号        | Raspberry PiのGPIO番号 |
| -------------------- | ------------------- |
| 7 (RXD, DIP#3)       | 14 (Pin#8)          |
| 6 (TXD, DIP#10)      | 15 (Pin#10)         |
| SPIMISO (PRG, DIP#7) | 23 (Pin#16)         |
| RESETN (RST, DIP#21) | 22 (Pin#15)         |
| 12 (SET, DIP#15)     | 12 (Pin#32)         |


---

# 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://twelite.gitbook.io/mw-psd-sta-rpi-1/usage.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.
