> For the complete documentation index, see [llms.txt](https://stage.twelite.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stage.twelite.info/usage/screens/main_menu/viewer/smpl_mon/cue_viewer.md).

# CUE ビューア

`Windows` `macOS` `Linux` `RasPi`

[TWELITE CUE](https://mono-wireless.com/cue)の通知メッセージを解釈します。

{% hint style="info" %}
本解説中は旧バージョンのキャプチャ画像です。
{% endhint %}

## TWELITE CUE

![画面例：面の検出](/files/9qCe0kCk094pC6BcPj0t)

TWELITE CUEのデフォルト設定(CUEモード)は、コイン電池でも動作できるスリープを用いた間欠駆動をしながら、いくつかの要因により起床し、様々なデータを送信します。

{% hint style="info" %}
CUEモードはTWELITE CUEの動作を確認できるようにするため、搭載するセンサーやLEDのすべてを動作させます。
{% endhint %}

#### 起床要因

* タイマーの起床（設定値による定期起床）
* 加速度の検出による起床
* 磁気センサーによる起床（磁石が近づいたことを検出した場合）

#### 送信データ

* 検出イベント（後述）
* モジュール電源電圧
* 磁気センサーの検出値
* 加速度データ

### パケット

パケットの基本情報を表示します。

| 項目    | 解説                                                                                                                               |
| ----- | -------------------------------------------------------------------------------------------------------------------------------- |
| #???? | これまでの受信パケット数です。                                                                                                                  |
| 種別    | [`E_PKT`](https://mwm5.twelite.info/references/parser/twefmt/twepacket/e_pkt)の値で、パケット種別です。TWELITE CUEからのパケットは通常PKT\_PAL=02になります。 |
| ID    | 送信元の論理IDです。通常は0..100の値になります。                                                                                                     |
| AD    | 送信元のシリアル番号です。                                                                                                                    |
| LQ    | LQI、電波強度に対応する値です。                                                                                                                |
| SQ    | パケットの続き番号です。                                                                                                                     |

### イベント

TWELITE CUEのデフォルトでは、必ず加速度イベントを出力します。起床要因に関わらず、起床後には一定サンプル数の加速度計測を行います。この加速度の計測結果に応じてイベントを送信します。

| 検出イベント | 番号                 | 解説                                                                                                                                                   |
| ------ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| ダイス    | 1(0x00) .. 6(0x06) | 定期起床と磁気センサー検出起床を起点に判定します。起床後に大きな加速度が検出される場合は、判定不可としたイベント(0xFF)を検出する場合があります。                                                                          |
| ムーブ    | 16(0x10)           | 加速度センサーが一定の基準を超えた加速度を検出して起床したときに、ムーブまたはシェイクのイベントが発生します。ムーブは、計測した加速度の変化が比較的小さい場合に発生します（加速度の変化は検出したが、連続的な加速度の変化がなかった場合に発生します）。                         |
| シェイク   | 8(0x08)            | 加速度センサーが一定以上の加速度を検出して起床したときに、ムーブまたはシェイクのイベントが発生します。シェイクは、計測した加速度の変化が比較的大きい場合に発生します。（加速度の変化は検出し、連続的な加速度の変化が検出できた場合に発生します。シェイクの名前の通り、本体を振り続けたときに発生します） |

{% hint style="info" %}
加速度により起床の検出閾値・イベントの検出条件について、定量的な定義は案内しておりません。
{% endhint %}

### 電圧

モジュールの電源電圧\[mV]です。

### 磁石

検出された磁石の極または未検出を表示します。

{% hint style="info" %}
磁気センサーの検出による起床かどうかを表示する機能はありません。
{% endhint %}

### 加速度

起床後に計測された加速度を表示します。

|       |                                                              |
| ----- | ------------------------------------------------------------ |
| サンプル  | 加速度のサンプル数を表示しています。10サンプル固定です。                                |
| レートID | 加速度のサンプルレートです。04固定で100Hzです。                                  |
| X,Y,Z | ３つの軸の加速度です。８サンプル分の平均値として求めています。単位はミリG (1000mG=1G=9.8m/s2)です。 |

## 画面例

![画面例：ムーブ（加速度の検出）](/files/zyIxnZjJW1Qgei8pLN2z)

![画面例：シェイク（振り続けた）](/files/YXvhZNLlWGxrtxAjfoNG)


---

# 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, and the optional `goal` query parameter:

```
GET https://stage.twelite.info/usage/screens/main_menu/viewer/smpl_mon/cue_viewer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
