Gyroscope
Gyroscope
A gyroscope is a device used for measuring or maintaining orientation and angular velocity.
To get started using it, you must use KmpGyroscope. To subscribe to changes to the device's gyroscope data, we invoke the startListening function. We can then process the results in our app.
_5KmpGyroscope.startListening { _5 val x = it.first_5 val y = it.second_5 val z = it.third_5}
To stop listening to acc changes, we use the function stopListening. It's important to deactivate the listener, so the component doesn't continue to broadcast gyroscope data changes to our app.
_1KmpGyroscope.stoplistening()
Any Setup Required?
None