embedded system library for e-puck  1.0.1
A redesigned API library for the e-puck robot platform
 All Data Structures Files Functions Variables Enumerations Enumerator Modules Pages
Macros | Enumerations | Functions
el_accelerometer.h File Reference
#include "el_common.h"
#include "el_clock.h"
#include "el_trigger.h"

Go to the source code of this file.

Macros

#define EL_ACCELEROMETER_OUTPUT_MAX   4095U
 
#define EL_ACCELEROMETER_ONE   0
 

Enumerations

enum  el_accelerometer_output { EL_ACCELERATION_X, EL_ACCELERATION_Y, EL_ACCELERATION_Z, EL_ACCELERATION_ALL_3V }
 

Functions

void el_enable_accelerometer ()
 enable the accelerometer
 
void el_disable_accelerometer ()
 disable the accelerometer
 
int el_accelerometer_get (el_index i, el_accelerometer_output u, el_int16 *out)
 get output value(s) from a accelerometer More...
 

Detailed Description

Author
Jianing Chen

Enumeration Type Documentation

This enum is used in el_accelerometer_get to select the output type to get.

Enumerator
EL_ACCELERATION_X 

get the acceleration along x-axis

EL_ACCELERATION_Y 

get the acceleration along y-axis

EL_ACCELERATION_Z 

get the acceleration along z-axis

EL_ACCELERATION_ALL_3V 

get the acceleration along all three axes

Function Documentation

int el_accelerometer_get ( el_index  i,
el_accelerometer_output  u,
el_int16 *  out 
)

get output value(s) from a accelerometer

Parameters
iindex of the accelerometer (currently can only be 0)
uoutput type
outpointer to a variable or an array of variables to store the output value(s).
Returns
number of values stored into *out.

The refreshing rate of the accelerometer outputs is 120 Hz.