upm  1.3.0
Sensor/Actuator repository for libmraa (v1.7.0)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions
ADIS16448 Class Reference

API for the Analog Devices ADIS16448 Accelerometer. More...

Detailed Description

This is an industrial-grade accelerometer by Analog Devices.

upm::ADIS16448* imu = new upm::ADIS16448(0,3); //upm::ADIS16448(SPI,RST)
//Read the specified register, scale it, and display it on the screen
std::cout << "XGYRO_OUT:" << imu->gyroScale(imu->regRead(XGYRO_OUT)) << std::endl;
std::cout << "YGYRO_OUT:" << imu->gyroScale(imu->regRead(YGYRO_OUT)) << std::endl;
std::cout << "ZGYRO_OUT:" << imu->gyroScale(imu->regRead(ZGYRO_OUT)) << std::endl;
std::cout << " " << std::endl;
std::cout << "XACCL_OUT:" << imu->accelScale(imu->regRead(XACCL_OUT)) << std::endl;
std::cout << "YACCL_OUT:" << imu->accelScale(imu->regRead(YACCL_OUT)) << std::endl;
std::cout << "ZACCL_OUT:" << imu->accelScale(imu->regRead(ZACCL_OUT)) << std::endl;
std::cout << " " << std::endl;

Public Member Functions

 ADIS16448 (int bus, int rst)
 ~ADIS16448 ()
void resetDUT ()
void configSPI ()
int16_t regRead (uint8_t regAddr)
void regWrite (uint8_t regAddr, uint16_t regData)
float accelScale (int16_t sensorData)
float gyroScale (int16_t sensorData)
float tempScale (int16_t sensorData)
float pressureScale (int16_t sensorData)
float magnetometerScale (int16_t sensorData)

Constructor & Destructor Documentation

ADIS16448 ( int  bus,
int  rst 

Constructor with configurable HW Reset

Here is the call graph for this function:

~ADIS16448 ( )


Member Function Documentation

void resetDUT ( )

Performs hardware reset by sending the specified pin low for 2 seconds

void configSPI ( )

Sets SPI frequency, mode, and bits/word

Here is the caller graph for this function:

int16_t regRead ( uint8_t  regAddr)

Reads a specified register and returns data

Here is the call graph for this function:

void regWrite ( uint8_t  regAddr,
uint16_t  regData 

Writes to a specified register

Here is the call graph for this function:

float accelScale ( int16_t  sensorData)

Scales accelerometer data

float gyroScale ( int16_t  sensorData)

Scales gyro data

float tempScale ( int16_t  sensorData)

Scales temperature data

float pressureScale ( int16_t  sensorData)

Scales pressure data

float magnetometerScale ( int16_t  sensorData)

Scales magnetometer data

The documentation for this class was generated from the following files: