Project 7
3-Axis Accelerometer Sensor Module
|
Neff Site |
This module implements an interface for the ADXL335 accelerometer module. More...
#include "adc.h"
Go to the source code of this file.
Macros | |
#define | ADXL335_PORT ADC_PORT |
#define | ADXL335_ADC ADC_MODULE |
#define | ADXL335_SCALE 48 |
#define | ADXL335_OFFSET1 2616 |
#define | ADXL335_OFFSET2 30000 |
Functions | |
uint16_t | adxl335_get_x_raw (void) |
Returns the x channel output. More... | |
uint16_t | adxl335_get_y_raw (void) |
Returns the y channel output. More... | |
uint16_t | adxl335_get_z_raw (void) |
Returns the z channel output. More... | |
void | adxl335_init (void) |
Initializes the accelerometer module. More... | |
uint16_t | adxl335_get_x (void) |
Returns the X channel output. More... | |
uint16_t | adxl335_get_y (void) |
Returns the Y channel output. More... | |
uint16_t | adxl335_get_z (void) |
Returns the Z channel output. More... | |
This module implements an interface for the ADXL335 accelerometer module.
#define ADXL335_ADC ADC_MODULE |
#define ADXL335_OFFSET1 2616 |
#define ADXL335_OFFSET2 30000 |
#define ADXL335_PORT ADC_PORT |
#define ADXL335_SCALE 48 |
uint16_t adxl335_get_x | ( | void | ) |
Returns the X channel output.
Converts the analog value of the X channel to a digital value between 0 and UINT16_MAX. It uses the formula val = scale*(res - offset1) + offset2 for the scaling.
uint16_t adxl335_get_x_raw | ( | void | ) |
Returns the x channel output.
uint16_t adxl335_get_y | ( | void | ) |
Returns the Y channel output.
Converts the analog value of the Y channel to a digital value between 0 and UINT16_MAX. It uses the formula val = scale*(res - offset1) + offset2 for the scaling.
uint16_t adxl335_get_y_raw | ( | void | ) |
Returns the y channel output.
uint16_t adxl335_get_z | ( | void | ) |
Returns the Z channel output.
Converts the analog value of the Z channel to a digital value between 0 and UINT16_MAX. It uses the formula val = scale*(res - offset1) + offset2 for the scaling.
uint16_t adxl335_get_z_raw | ( | void | ) |
Returns the z channel output.
void adxl335_init | ( | void | ) |
Initializes the accelerometer module.
Contact | Generated by 1.8.13 |