
Kivy Cookbook
By :

Mobile devices today also have a gyroscope. The gyroscope is considered as a no-touch event. This kind of event does not have a start or an end; it is always providing information.
For this recipe, we will use the Kv language for the design of the widgets. Also, this recipe will use the common button and label widgets for reference. Obviously, to run the code of this recipe properly, a device with a gyroscope is necessary.
It is necessary to install a package to use the gyroscope with any mobile device. While there is a way to deal with specific devices, we do not have to reinvent the wheel. Let's use the plyer
package, which is an effort from many of the Kivy developers. To install the package from the shell, use:
$ sudo pip plyer install
To complete this recipe, follow these steps:
<Acce>: Label: id: label1 pos: 150, 300 text: 'X: ' ...
Change the font size
Change margin width
Change background colour