awesome library  0.5
Library for tutorial guiding through the library creation process
Functions | Variables
imu_init.c File Reference

This Propeller C library was created for the Parallax 9-axis IMU Sensor, based on the STMicroelectronics LSM9DS1 inertial motion sensor chip. More...

#include "simpletools.h"
#include "lsm9ds1.h"

Functions

int imu_init (int pinSCL, int pinSDIO, int pinAG, int pinM)
 Initializes the LSM9DS1 IMU module. More...
 

Variables

int __pinAG
 
int __pinM
 
int __pinSDIO
 
int __pinSCL
 
char __autoCalc = 0
 

Detailed Description

This Propeller C library was created for the Parallax 9-axis IMU Sensor, based on the STMicroelectronics LSM9DS1 inertial motion sensor chip.

Author
Matthew Matz
Version
0.5

Function Documentation

int imu_init ( int  pinSCL,
int  pinSDIO,
int  pinAG,
int  pinM 
)

Initializes the LSM9DS1 IMU module.

This function initializes the LSM9DS1 IMU module. It sets the chip to 3-wire SPI mode and starts up the accelerometer, gyroscope, and magnetometer.

Note
Defaults the Accelerometer scale to +/-8g, the Gryoscope scale to +/- 500 DPS, and the Magnetometer scale to +/-12 gauss.
Parameters
pinSCLI/O Pin connected to the module's SCL pin.
pinSDIOI/O Pin connected to the module's SDIO pin.
pinAGI/O Pin connected to the module's CS_AG pin.
pinMI/O Pin connected to the module's CS_M pin.
Returns
0x683D if both the Accel/Gyro and Mag start up successfully, or 0 of neither sensor starts.