Class EV3GyroSensor

    • Constructor Detail

      • EV3GyroSensor

        public EV3GyroSensor​(Port port)
      • EV3GyroSensor

        public EV3GyroSensor​(UARTPort port)
    • Method Detail

      • getAngleMode

        public SampleProvider getAngleMode()
        EV3 Gyro sensor, Angle mode
        Measures the orientation of the sensor in respect to its start orientation.

        Size and content of the sample
        The sample contains one elements representing the orientation (in Degrees) of the sensor in respect to its start position.

        Configuration
        The start position can be set to the current position using the reset method of the sensor.

        Returns:
        A sampleProvider See leJOS conventions for SampleProviders
      • getRateMode

        public SampleProvider getRateMode()
        EV3 Gyro sensor, Rate mode
        Measures angular velocity of the sensor.

        Size and content of the sample
        The sample contains one elements representing the angular velocity (in Degrees / second) of the sensor.

        Configuration
        The sensor can be recalibrated using the reset method of the sensor.

        Returns:
        A sampleProvider See leJOS conventions for SampleProviders
      • getAngleAndRateMode

        public SampleProvider getAngleAndRateMode()
        EV3 Gyro sensor, Rate mode
        Measures both angle and angular velocity of the sensor.

        Size and content of the sample
        The sample contains two elements. The first element contains angular velocity (in degrees / second). The second element contain angle (in degrees).

        Configuration
        The sensor can be recalibrated using the reset method of the sensor.

        Returns:
        A sampleProvider See leJOS conventions for SampleProviders
      • reset

        public void reset()
        Hardware calibration of the Gyro sensor and reset off accumulated angle to zero.
        The sensor should be motionless during calibration.