I²C バスのサポート。バスはボード上で一度だけ設定し、周辺機器パッケージ(RTC、IMU、タッチ)がそれを共有します。
リポジトリ: github.com/dekiengine/deki-i2c · 最新リリース: 0.19.0 · エンジン 0.19.0 以降が必要
DekiEditor --packages-add deki-i2c <project> か、パッケージマネージャーからインストールします。エンジン自身のコンポーネントと C++ API は Deki のドキュメントにあります。
エディターでは I2C と表示されます。
コンポーネント
| コンポーネント | カテゴリ | 説明 |
| I2CBusComponent | システム | 起動時に I2C バスを 1 つ開始します。そのバス上のチップはすべてこれを共有します。 |
コンポーネントリファレンス
I2CBusComponent
起動時に I2C バスを 1 つ開始します。そのバス上のチップはすべてこれを共有します。
インスペクターでの名前: I2C バスコンポーネント · カテゴリ: システム · 型: DekiI2c::I2CBusComponent
| プロパティ | 型 | デフォルト | 制約 | 説明 |
| i2cPort | int32 | 0 | 0 から 3 | チップのどの I2C コントローラーを使うかです。ほとんどのボードは 1 つしか配線していないので、回路図で別の指定がなければ 0 です。 |
| sdaPin | int32 | 21 | 0 から 48 | I2C のデータ線 (SDA) の GPIO です。センサーの配線と一致させる必要があります。このバスのすべてのデバイスで共有します。 |
| sclPin | int32 | 22 | 0 から 48 | I2C のクロック線 (SCL) の GPIO です。SDA と同じく、このバスのすべてのデバイスで共有します。 |
| i2cHz | int32 | 400000 | 10000 から 1e+06 | バスの速度です。100 kHz は安全な標準モード、400 kHz は一般的な高速モードです。配線が長いときやデバイスが多いときは低い値が必要です。高すぎると、読み込みがときどき失敗します。 |
変更履歴
変更履歴は英語です。
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: DekiI2CRegisterComponents, DekiI2CGetAutoComponentCount, DekiI2CEnsureRegistered and the rest. Built against engine ABI 21; a build of this package from before does not load and is rebuilt.
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)。プロパティ名はシーンファイルで使われるキーです。名前を変えても別名が残ります (互換性)。