com.buglabs.bug.module.lcd
Class ML8953AccelerometerImplementation

java.lang.Object
  extended by com.buglabs.bug.module.lcd.ML8953AccelerometerImplementation
All Implemented Interfaces:
IAccelerometerSampleProvider, IML8953Accelerometer

public class ML8953AccelerometerImplementation
extends java.lang.Object
implements IML8953Accelerometer, IAccelerometerSampleProvider

Handles fetching parsing, passing back values from sysfs relating to the ML8953Accelerometer.


Constructor Summary
ML8953AccelerometerImplementation()
           
 
Method Summary
 AccelerometerSample readSample()
          Reads a single sample of the X,Y,Z axes.
 short readX()
          Read the X-Axis data from the accelerometer device.
 short readY()
          Read the Y-Axis data from the accelerometer device.
 short readZ()
          Read the Z-Axis data from the accelerometer device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ML8953AccelerometerImplementation

public ML8953AccelerometerImplementation()
Method Detail

readX

public short readX()
            throws java.io.IOException
Description copied from interface: IML8953Accelerometer
Read the X-Axis data from the accelerometer device.

Specified by:
readX in interface IML8953Accelerometer
Returns:
X-Axis Data
Throws:
java.io.IOException

readY

public short readY()
            throws java.io.IOException
Description copied from interface: IML8953Accelerometer
Read the Y-Axis data from the accelerometer device.

Specified by:
readY in interface IML8953Accelerometer
Returns:
Y-Axis Data
Throws:
java.io.IOException

readZ

public short readZ()
            throws java.io.IOException
Description copied from interface: IML8953Accelerometer
Read the Z-Axis data from the accelerometer device.

Specified by:
readZ in interface IML8953Accelerometer
Returns:
Z-Axis Data
Throws:
java.io.IOException

readSample

public AccelerometerSample readSample()
                               throws java.io.IOException
Description copied from interface: IML8953Accelerometer
Reads a single sample of the X,Y,Z axes.

Specified by:
readSample in interface IAccelerometerSampleProvider
Specified by:
readSample in interface IML8953Accelerometer
Returns:
The latest sample from the accelerometer.
Throws:
java.io.IOException