|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAccelerometer3D
IAccelerometer3D provides methods that should be meaningful for any 3-axis accelerometer. One set of methods return the current acceleration measured along each axis. A second set of methods use the acceleration along an axis in order to compute the inclination, or tilt, of that axis.
| Field Summary | |
|---|---|
static int |
ALL_AXES
|
static int |
X_AXIS
|
static int |
Y_AXIS
|
static int |
Z_AXIS
|
| Method Summary | |
|---|---|
double |
getAccel()
Compute the current total acceleration. |
double |
getAccel(int axis)
Read the current acceleration for the indicated axis. |
double[] |
getAccelValues()
Return all the current values. |
double |
getAccelX()
Read the current acceleration along the X axis. |
double |
getAccelY()
Read the current acceleration along the Y axis. |
double |
getAccelZ()
Read the current acceleration along the Z axis. |
double |
getTilt(int axis)
Compute the inclination of the specified SPOT axis. |
double |
getTiltX()
Compute the inclination of the SPOT's X axis. |
double |
getTiltY()
Compute the inclination of the SPOT's Y axis. |
double |
getTiltZ()
Compute the inclination of the SPOT's Z axis. |
| Methods inherited from interface com.sun.spot.resources.transducers.ITransducer |
|---|
createSensorEvent, getDescription, getMaxSamplingRate, saveEventState |
| Methods inherited from interface com.sun.spot.resources.IResource |
|---|
addTag, getTags, getTagValue, hasTag, removeTag |
| Field Detail |
|---|
static final int X_AXIS
static final int Y_AXIS
static final int Z_AXIS
static final int ALL_AXES
| Method Detail |
|---|
double getAccelX()
throws IOException
IOException
double getAccelY()
throws IOException
IOException
double getAccelZ()
throws IOException
IOException
double getAccel(int axis)
throws IOException
axis - which axis to return (ALL_AXES = total acceleration)
IOException
double getAccel()
throws IOException
IOException
double[] getAccelValues()
throws IOException
IOException
double getTiltX()
throws IOException
IOException
double getTiltY()
throws IOException
IOException
double getTiltZ()
throws IOException
IOException
double getTilt(int axis)
throws IOException
axis - which axis to return Note: specifying ALL_AXES will throw an IllegalArgumentException.
IOException
|
SunSPOT API V6.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||