07 Apr 2016 06:47:10 UTC
- Distribution: Device-LSM303DLHC
- Module version: 0.014
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (188 / 0 / 0)
- KwaliteeBus factor: 0
- 65.64% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity24 month
- Download (17.62KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionSHANTANU Shantanu Bhadoriaand 1 contributors
- Shantanu Bhadoria <shantanu at cpan dott org>
- COPYRIGHT AND LICENSE
Device::Accelerometer::LSM303DLHC - I2C interface to Accelerometer on the LSM303DLHC 3 axis magnetometer(compass) and accelerometer using Device::SMBus
Contains the I2CDevice Address for the bus on which your Accelerometer is connected. It would look like 0x6b. Default is 0x19.
This is a correction factor for converting raw values of acceleration in units of g or gravitational acceleration. It depends on the sensitivity set in the registers.
This is the acceleration due to gravity in meters per second square usually represented as g. default on earth is around 9.8 although it differs from 9.832 near the poles to 9.780 at equator. This might also be different if you are on a different planet or in space.
This attribute is built from the above two attributes automatically. This is usually gCorrectionFactor divided by gravitationalAcceleration. This is the inverse of relation between raw accelerometer values and its value in meters per seconds.
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
Return raw readings from accelerometer registers
returns four acceleration vectors with accelerations in multiples of g - (9.8 meters per second square) note that even when stationary on the surface of earth(or a earth like planet) there is a acceleration vector g that applies perpendicular to the surface of the earth pointing opposite of the surface.
returns four acceleration vectors with accelerations in meters per second square note that even when stationary on the surface of earth(or a earth like planet) there is a acceleration vector g that applies perpendicular to the surface of the earth pointing opposite of the surface.
returns coordinate angles between the acceleration vector(R) and the cartesian Coordinates(x,y,z).
returns Roll and Pitch from the accelerometer. This is a bare reading from accelerometer and it assumes gravity is the only force on the accelerometer, which means it will be quiet inaccurate for a accelerating accelerometer.
placeholder for calibration function
Shantanu Bhadoria <shantanu at cpan dott org>
This software is copyright (c) 2016 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.
Module Install Instructions
To install Device::LSM303DLHC, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Device::LSM303DLHC
For more information on module installation, please visit the detailed CPAN module installation guide.