LIS2MDL Magnetometer
The LIS2MDL is an ultra-low-power, high performance 3-axis digital magnetic sensor.
You can use the LIS2MDL (About Modules) module with the LIS2MDL as follows:
I2C
I2C1.setup({sda:..., scl:...);
var mag = require("LIS2MDL").connectI2C(I2C1);
print(mag.read()); // prints { x: ..., y: ..., z: ... }
Note: you can supply addr
to connectI2C
's second argument to set an I2C
address if it is non-standard.
Reference
LIS2MDL.prototype.off = function () { ... }
LIS2MDL.prototype.read = function () { ... }
function (options, r, w) { ... }
exports.connectI2C = function (i2c, options) { ... }
This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.