https://github.com/coder543/lsm9ds0
An LSM9DS0 driver for the STM32-F334R8 (but it should work on similar systems and be easily portable)
https://github.com/coder543/lsm9ds0
Last synced: 5 months ago
JSON representation
An LSM9DS0 driver for the STM32-F334R8 (but it should work on similar systems and be easily portable)
- Host: GitHub
- URL: https://github.com/coder543/lsm9ds0
- Owner: coder543
- License: gpl-2.0
- Created: 2015-05-25T15:40:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-22T20:14:16.000Z (about 10 years ago)
- Last Synced: 2025-02-26T22:22:57.826Z (9 months ago)
- Language: C
- Size: 813 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LSM9DS0
A small, simple LSM9DS0 driver for the STM32-F334R8 (but it should work on similar systems and be easily portable)
This driver is part of the work I'm doing for Google Summer of Code 2015.
To use this driver is relatively straightforward. Simply creating and initializing an instance of the LSM9DS0 driver will immediately configure the LSM9DS0 with some sane defaults, along with starting the actual data collection. After that, simply call `readAccel()` to get a vector of acceleration values out of the onboard buffer in the LSM9DS0, and repeat that for `readGyro()` or `readMagneto()`, depending on what data you want. There are also functions to set the scale of each sensor, should you want to adjust that away from the defaults, which are +/- 2G on the accelerometer, 245 degrees per second on the gyro, and +/- 2 guass for the magnetometer. To set the scales, use constants from the `LSM9DS0_constants.h` file. You will also find some useful functions in `LSM9DS0_helper.h` that help with converting from the raw integer values coming out of the LSM9DS0 into scaled floating point values that respect units more properly.
If you find a bug, or need access to a feature of the LSM9DS0 that isn't currently exposed, send me a message at my github username @ gmail.com, but for most people's needs, I believe this driver will probably suffice.