Interface Accelerometer

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  Accelerometer.Range  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double getX()
      Common interface for getting the x axis acceleration.
      double getY()
      Common interface for getting the y axis acceleration.
      double getZ()
      Common interface for getting the z axis acceleration.
      void setRange​(Accelerometer.Range range)
      Common interface for setting the measuring range of an accelerometer.
    • Method Detail

      • setRange

        void setRange​(Accelerometer.Range range)
        Common interface for setting the measuring range of an accelerometer.
        Parameters:
        range - The maximum acceleration, positive or negative, that the accelerometer will measure. Not all accelerometers support all ranges.
      • getX

        double getX()
        Common interface for getting the x axis acceleration.
        Returns:
        The acceleration along the x axis in g-forces
      • getY

        double getY()
        Common interface for getting the y axis acceleration.
        Returns:
        The acceleration along the y axis in g-forces
      • getZ

        double getZ()
        Common interface for getting the z axis acceleration.
        Returns:
        The acceleration along the z axis in g-forces