Class HiTechnicAccelerometer

    • Constructor Detail

      • HiTechnicAccelerometer

        public HiTechnicAccelerometer​(I2CPort port,
                                      int address)
        Creates a SampleProvider for the HiTechnic Acceleration Sensor
        Parameters:
        port - the I2C port
        address - the I2C address of the sensor
      • HiTechnicAccelerometer

        public HiTechnicAccelerometer​(I2CPort port)
        Creates a SampleProvider for the HiTechnic Acceleration Sensor
        Parameters:
        port - the I2C port
      • HiTechnicAccelerometer

        public HiTechnicAccelerometer​(Port port,
                                      int address)
        Creates a SampleProvider for the HiTechnic Acceleration Sensor
        Parameters:
        port - the sensor port
        address - the I2C address of the sensor
      • HiTechnicAccelerometer

        public HiTechnicAccelerometer​(Port port)
        Creates a SampleProvider for the HiTechnic Acceleration Sensor
        Parameters:
        port - the I2C port
    • Method Detail

      • init

        protected void init()
      • getAccelerationMode

        public SensorMode getAccelerationMode()
        HiTechnic NXT Acceleration , Acceleration mode
        Measures acceleration over three axes.

        Size and content of the sample
        The sample contains 3 elements, containing acceleration over the X, Y and Z axis respectively. The range of the sensor is -2 to 2 G (1G = 9.81 m/s2).

        Returns:
        A sampleProvider See leJOS conventions for SampleProviders See Sensor datasheet