SCA3000 triple axis digital interface accelerometer

Embed: (wiki syntax)

« Back to documentation index

SCA3000 Class Reference

SCA3000 Class Reference

SCA3000, triple axis, digital interface, accelerometer. More...

#include <SCA3000.h>

Public Member Functions

 SCA3000 (PinName mosi, PinName miso, PinName sck, PinName cs, PinName nr)
 Constructor.
int getRevId (void)
 Read the revision ID register on the device.
float getAcceleration (int axis)
 Get the register contents acceleration value for the given axis, using the nominal sensitivity values found in the datasheet.
int getCounts (int axis)
 Get the register contents acceleration value for the given axis, in counts.

Detailed Description

SCA3000, triple axis, digital interface, accelerometer.

Definition at line 64 of file SCA3000.h.


Constructor & Destructor Documentation

SCA3000 ( PinName  mosi,
PinName  miso,
PinName  sck,
PinName  cs,
PinName  nr 
)

Constructor.

Includes.

Parameters:
mosimbed pin to use for MOSI line of SPI interface.
misombed pin to use for MISO line of SPI interface.
sckmbed pin to use for SCK line of SPI interface.
csmbed pin to use for not chip select line of SPI interface.
nrmbed pin to use for the not reset line.
Author:
Aaron Berk

LICENSE

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

DESCRIPTION

SCA3000, triple axis, digital interface, accelerometer.

Datasheet:

http://www.sparkfun.com/datasheets/Sensors/Accelerometer/SCA3000-D01.pdf

Definition at line 38 of file SCA3000.cpp.


Member Function Documentation

float getAcceleration ( int  axis )

Get the register contents acceleration value for the given axis, using the nominal sensitivity values found in the datasheet.

Parameters:
axisThe axis to get acceleration values for.
Returns:
The acceleration on the specified axis in mg.

Definition at line 74 of file SCA3000.cpp.

int getCounts ( int  axis )

Get the register contents acceleration value for the given axis, in counts.

Parameters:
axisThe axis to get the counts values for.
Returns:
The acceleration on the specified axis in counts.

Definition at line 80 of file SCA3000.cpp.

int getRevId ( void   )

Read the revision ID register on the device.

Returns:
The revision ID number.

Definition at line 68 of file SCA3000.cpp.