mydazy/esp_sc7a20h

1.0.1

Yanked
uploaded 2 weeks ago
Yank reason: Superseded by v2.0.0 (full C API rewrite). See CHANGELOG.md for migration guide.
SC7A20H 3-axis accelerometer driver with motion detection, deep-sleep wakeup and LIS2DH12-compatible register layout (Silan Microelectronics)

changelog

# Changelog

All notable changes to **esp_sc7a20h** will be documented here.
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.1] - 2026-04-26

### Changed

- All in-source comments and log strings translated from Chinese to English for global readability.
- Header documentation rewritten in English Doxygen style.

### Added

- `examples/basic_motion_wakeup/` — minimal pickup-to-wake project demonstrating I2C init, motion detection, deep-sleep wake-up.
- `.clang-format` — coding style based on Google C++ with ESP-IDF conventions (4-space indent, 100-column).
- GitHub Actions multi-IDF-version build matrix (5.3 / 5.4 / 5.5) for the example.

### Notes

- No API or wire-format changes. Source-compatible drop-in for v1.0.0.

## [1.0.0] - 2026-04-26

### Added

- Initial public release.
- I2C driver using ESP-IDF v5.x `i2c_master` API.
- 12-bit raw + scaled `mg` acceleration readout.
- Configurable range (±2 / 4 / 8 / 16 g) and ODR (1 Hz – 400 Hz).
- Motion-detect interrupt with XYZ OR-trigger, configurable threshold/duration, latched on INT1.
- One-line `ConfigDeepSleepWakeup(gpio)` — sets up EXT1 wakeup + RTC GPIO pull-up.
- One-line `InitWithMotionDetection(cfg)` — init + IRQ + 500 ms debounce.
- `esp_err_t` error propagation throughout.
- RAII destructor: powers down sensor and unregisters I2C device.

### Notes

- LIS2DH12 / LIS3DH register-compatible — most LIS2DH12 reference code applies.
- Tested on ESP-IDF 5.3 / 5.4 / 5.5 with ESP32-S3.

Links

Supports all targets

Maintainer

  • mydazy <opensource@mydazy.com>

License: Apache-2.0

To add this component to your project, run:

idf.py add-dependency "mydazy/esp_sc7a20h^1.0.1"

download archive

Stats

  • Archive size
    Archive size ~ 16.28 KB
  • Downloaded in total
    Downloaded in total 8 times
  • Weekly Downloads Weekly Downloads (All Versions)
  • Downloaded this version
    This version: 4 times

Badge

mydazy/esp_sc7a20h version: 1.0.1
|