Adxl345 Class
- ID: adxl345
- Name: 3-axis, +/- 2/4/8/16 g Digital Accelerometer
- Other Names: Grove 3-Axis Digital Accelerometer (16g)
- Category: accelerometer
- Manufacturer: seeed
- Connection: i2c
- Link: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf
ADXL345 is a 3-axis digital accelerometer. ( http://www.seeedstudio.com/wiki/images/2/2c/ADXL345_datasheet.pdf ) The sensor has configurable resolutions to measure +/- 2g, +/- 4g, +/- 8g, or +/- 16g. Note: The Grove* version of the sensor is incompatible with and not detected on the I2C bus by the Intel(R) Edison using an Arduino* breakout board at 5V (3V works fine).
                      
Item Index
Methods
Methods
Adxl345
                      
                              - 
                                              bus
Creates an ADXL345 object
Parameters:
- 
                                              busNumberNumber of the used I2C bus 
Returns:
getAcceleration
                      
                              ()
                      
                              
                                  Float *
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          there is no need for a ADXL345 object destructor ~Adxl345(); Returns a pointer to a float[3] that contains acceleration (g) forces
Returns:
float* to a float[3]
getRawValues
                      
                              ()
                      
                              
                                  Int16_t *
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns a pointer to an int[3] that contains the raw register values for X, Y, and Z
Returns:
int* to an int[3]
getScale
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns the scale the accelerometer is currently set up to: 2, 4, 8, or 16
Returns:
uint with the current scale value
update
                      
                              ()
                      
                              
                                  Mraa::Result
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Updates the acceleration values from the I2C bus
Returns:
0 if successful