Tibbit #36 (3-axis accelerometer)
npm install @tibbo-tps/tibbit-36The node module for collecting data from Tibbit #36 (3-axis accelerometer).
The module is available as precompiled binary and C source code.
Install the module
```
npm install @tibbo-tps/tibbit-36
`js`
var accelerometer = require("@tibbo-tps/tibbit-36").init(socket);
Returns an object with a singe method:
Returns an object with the following properties:
* error - Error message or null
* lx - X-Axis data
* ly : Y-Axis data
* lz : X-Axis data
`js``
var accelerometer = require("@tibbo-tps/tibbit-36").init("S15");
setInterval(function(){
var data = accelerometer.getData();
console.log(data);
},1000);
This Tibbit is based on the ADXL312 accelerometer IC with I2C interface. The sensor is implemented as the C1 device.
The module measures acceleration in the +/-12G range, simultaneously in three axes, and with 2.9mG resolution.
This C1 device requires that Tibbit #00-3 is installed in the neighbouring "M" socket. #00-3 provides two direct lines for I2C comms, as well as the ground and +5V power for the ADXL312 IC.