/Kotlin_app---Motion_and_Position_Sensors

A Kotlin script to obtain data from the smartphone Motion and Position sensors.

Primary LanguageKotlin

Kotlin app - Motion and Position Sensors

A Kotlin script to obtain data from the smartphone Motion and Position sensors.

It can get sensor data from ACCELEROMETER, GRAVITY, GYROSCOPE, LINEAR_ACCELERATION, ROTATION_VECTOR, GEOMAGNETIC_ROTATION_VECTOR, MAGNETIC_FIELD, ORIENTATION (yaw, pitch, roll) sensors. The values are updated every time the sensor changes its value and are displayed on the smartphone's screen. If you don't have any of the sensors, the app will show a message "Sensor not available" on the correspondent textView.

The goal of this code is to try to help someone who needs a simple code to read the data from the sensors. You can see an example of output (app screenshot) in the file "Output.jpg"