Device::Magnetometer::LSM303DLHC - I2C interface to Magnetometer on the LSM303DLHC 3 axis magnetometer(compass) and accelerometer using Device::SMBus
version 0.010
Contains the I2CDevice Address for the bus on which your Magnetometer is connected. It would look like 0x6b. Default is 0x1e.
$self->enable()
Initializes the device, Call this before you start using the device. This function sets up the appropriate default registers. The Device will not work properly unless you call this function
$self->getRawReading()
Return raw readings from accelerometer registers
$self->getMagnetometerScale1()
Return proper calculated readings from the magnetometer scaled between +0.5 and -0.5
Shantanu Bhadoria <shantanu at cpan dott org>
This software is copyright (c) 2013 by Shantanu Bhadoria.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Device::LSM303DLHC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::LSM303DLHC
CPAN shell
perl -MCPAN -e shell install Device::LSM303DLHC
For more information on module installation, please visit the detailed CPAN module installation guide.