icommand.nxt
Class TiltSensor

java.lang.Object
  extended by icommand.nxt.I2CSensor
      extended by icommand.nxt.TiltSensor

public class TiltSensor
extends I2CSensor

TiltSensor by Mindsensors.com. Works with: ACCL-Nx-3g3x UNTESTED: ACCL-Nx-2g2x, ACCL-Nx-5g2x

Author:
BB

Nested Class Summary
 class TiltSensor.AccelData
           
 
Field Summary
 
Fields inherited from class icommand.nxt.I2CSensor
DEFAULT_ADDRESS, PRODUCT_ID, SENSOR_TYPE, STOP, VERSION
 
Constructor Summary
TiltSensor(SensorPort s)
           
 
Method Summary
 TiltSensor.AccelData getAccelData()
          Method to return all acceleration data in one call NOT AS RELIABLE AS GETTING INDIVIDUAL VALUES!!!
 int getXAccel()
          Acceleration along X axis.
 int getXTilt()
          Tilt of sensor along X-axis (see top of Mindsensors.com sensor for diagram of axis).
 int getYAccel()
           
 int getYTilt()
           
 int getZAccel()
           
 int getZTilt()
           
 
Methods inherited from class icommand.nxt.I2CSensor
fetchString, getData, getData, getId, getProductID, getSensorType, getVersion, sendData, sendData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TiltSensor

public TiltSensor(SensorPort s)
Method Detail

getXTilt

public int getXTilt()
Tilt of sensor along X-axis (see top of Mindsensors.com sensor for diagram of axis). 128 is level.

Returns:

getYTilt

public int getYTilt()

getZTilt

public int getZTilt()

getXAccel

public int getXAccel()
Acceleration along X axis. Positive or negative values in mg. (g = acceleration due to gravity = 9.81 m/s^2)

Returns:
Acceleration e.g. 9810 mg (falling on earth)

getYAccel

public int getYAccel()

getZAccel

public int getZAccel()

getAccelData

public TiltSensor.AccelData getAccelData()
Method to return all acceleration data in one call NOT AS RELIABLE AS GETTING INDIVIDUAL VALUES!!!



Copyright 2006. All Rights Reserved.