Since | Origin / Contributor | Maintainer | Source |
---|---|---|---|
2016-04-08 | Jason Schmidlapp | Jason Schmidlapp | adxl345.c |
This module provides access to the ADXL345 triple axis accelerometer.
Samples the sensor and returns X,Y and Z data from the accelerometer.
adxl345.read()
X,Y,Z data (integers)
adxl345.init(1, 2)
local x,y,z = adxl345.read()
print(string.format("X = %d, Y = %d, Z = %d", x, y, z))
Initializes the module and sets the pin configuration.
adxl345.init(sda, scl)
sda
data pinscl
clock pinnil