From f2dd58393e6bdcea27a261a44508853e082e80d9 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 21:44:13 +0000 Subject: [PATCH] feat: introduce promise-based API for async methods This commit introduces a new Promise-based API for all asynchronous methods in the `i2c` class. The new methods are suffixed with `Async` to ensure backward compatibility with the existing callback-based API. The following methods have been added: - `scanAsync` - `openAsync` - `writeAsync` - `writeByteAsync` - `writeBytesAsync` - `readAsync` - `readByteAsync` - `readBytesAsync` - `closeAsync` The `examples/accelerometer/accel.js` example has been updated to use the new `async/await` syntax with the Promise-based API.