Drive LIS3DH & LIS3DSH accelerometers over I2C/SPI with PHP

Maintainers

Package info

github.com/DeptOfScrapyardRobotics/LIS3Dx

Homepage

pkg:composer/dept-of-scrapyard-robotics/lis3dx

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.4.1 2026-06-09 19:26 UTC

This package is auto-updated.

Last update: 2026-08-11 22:07:10 UTC


README

I2C/SPI drivers for LIS3DH (solid) / LIS3DSH (stub). Extends GeneralPurposeIO\Circuits\Types\SensorIC and implements Waveforms\Contracts\Motion\MeasuresAcceleration (x() / y() / z() in g).

Register

Provider registers catalog slugs lis3dh, lis3dsh and wires lis3dx:make-profile into circuit:make-profile.

Profiles

workshop vendor:publish --tag=gpio-circuits-config
workshop circuit:make-profile          # picks any installed IC; LIS3Dx delegates here
workshop lis3dx:make-profile           # LIS3DH / LIS3DSH only

SPI profile/factory params use spi_device / spi_adapter (not bare device / adapter).

$imu = Circuit::profile('lis3dh_board');
$imu->x(); // g
$imu->y();
$imu->z();

Smoke sketch

php workshop runner lis3dx-smoke
php workshop runner lis3dx-smoke --profile=lis3dh_board