DEKI/ENGINE ドキュメント
deki-imu 0.19.0
Deki パッケージリファレンス
deki-imu

ハードウェア歩数計を備えた 6 軸 IMU(加速度センサー + ジャイロスコープ)。I²C で接続する LSM6DS3。

リポジトリ: github.com/dekiengine/deki-imu · 最新リリース: 0.19.0 · エンジン 0.19.0 以降が必要 · 依存: deki-i2c

DekiEditor --packages-add deki-imu <project> か、パッケージマネージャーからインストールします。エンジン自身のコンポーネントと C++ API は Deki のドキュメントにあります。

エディターでは IMU (Accelerometer + Gyroscope) と表示されます。

コンポーネント

コンポーネント カテゴリ 説明
LSM6DS3IMUComponent センサー LSM6DS3 モーションセンサーを I2C で読み取ります。歩数計にも対応します。

機能フラグ

ビルドから外せる部分です。define を持つ機能はその define で切り替わり、それ以外はコンポーネントと一緒に取り除かれます。

機能 define デフォルト
LSM6DS3 (I²C, 6-axis + hardware pedometer) DEKI_FEATURE_IMU_LSM6DS3 オン

コンポーネントリファレンス

LSM6DS3IMUComponent

LSM6DS3 モーションセンサーを I2C で読み取ります。歩数計にも対応します。

インスペクターでの名前: LSM6DS3 IMU · カテゴリ: センサー · 型: DekiImu::LSM6DS3IMUComponent

プロパティ 型 デフォルト 制約 説明
i2cPort int32 0 0 から 3 センサーがつながっている I2C バスです。そのポートを設定した I2C バスコンポーネントと一致させる必要があります。
i2cAddress int32 106 0 から 127 バス上のセンサーのアドレスで、SDO/SA0 ピンで決まります。ピンが Low なら 0x6A、High なら 0x6B です。このピンの配線を変えれば、このチップ 2 つで 1 つのバスを共有できます。
enablePedometer bool true チップ内蔵の歩数計を動かします。ハードウェアで数えるので、CPU を起こさずに歩数がたまっていきます。消費電流は少し増えます。

変更履歴

変更履歴は英語です。

0.19.0

Changed

  • minEngine 0.19.0: built against engine 0.19.0, whose component metadata records the package each class is in. A build of this package from before does not load and is rebuilt.

Added

  • Japanese, Simplified Chinese and Korean: editor/lang/ja.json, zh.json and ko.json translate the names, tooltips and enum values this package's components show in the Inspector.

0.18.0

Changed

  • minEngine 0.18.0. Reflection ABI 21: the package must be rebuilt.
  • Names follow the code style (deki-engine/docs/codestyle): types, functions and enum values are PascalCase, constants kPascalCase, members m_PascalCase, locals and parameters camelCase. The code is formatted with clang-format 22.
  • The functions the editor finds by name are PascalCase: DekiIMURegisterComponents, DekiIMUGetAutoComponentCount, DekiIMUEnsureRegistered and the rest. Built against engine ABI 21; a build of this package from before does not load and is rebuilt.

Fixed

  • LSM6DS3: resetting the step count works. It set a bit in the wrong register, so the count never cleared.
  • LSM6DS3: with the pedometer on, the gyroscope's X and Z axes stay on. Turning the pedometer on switched them off on the original LSM6DS3. The pedometer bits now follow the chip: the LSM6DS3 and the LSM6DS3TR-C keep them in different places.

Removed

  • The former names from before 0.16.0 (bare class names, and deki-gpio's DekiEsp32::ESP32PinSetup). A scene that old is upgraded with 0.17 first.

それ以前のリリース: CHANGELOG.md


パッケージのリフレクションデータから生成しています (エンジン 0.19.0)。プロパティ名はシーンファイルで使われるキーです。名前を変えても別名が残ります (互換性)。