Motorcycle app - angle reading in corners

hello
I’m not a programmer and I’m not likely to stay, but I want to make a simple motorcycle application (for my own use)

I have a hc-06 bluetooth module built-in to my motorcycle and I have managed to make a bluetooth ignition switch, a speedometer and a protection against accidental switching off the ignition in my application. it was easy, so I already did a few things, but there is something that is far beyond me
I would like to take a motorcycle angle reading in a bend with graphic display

I want to draw a motorcycle vertically and when the motorcycle leans in turns, the drawing leans at the same angle and displays the value of the inclination in degrees

i’ll be thankfull for tips :slight_smile:

something like yamaha my ride app

This will be difficult Seweryn. It is not simple. You need to use the OrientationSensor (for pitch and / or roll) or the x, y axes of the Accelerometer . If your Android has a gyroscope, that might work better The advice here discusses all three tools

The developer asking for advice had a different purpose than what you require but the discussion (and the links ... be sure to read them all) might help you to experiment. The advice and techniques might be appropriate to what your bluetooth outputs.

Let us know what you discover.

To plot the actual angles, you might modify Juan Antonio’s rotating circle using a Canvas . The example provides a circle you can rotate with a finger he envisioned as a volume control. The results are degrees of rotation. It might work fine to control your bike attitude perhaps and can be converted to a display. Does it work in your intended application?