LIS2DH12: problem while measuring degree of inclination in 0 - 360 values
Hello there,
I have a device called RuuviTag that includes your LIS2DH12 accelerometer and that can be programmed by means of an IDE called Espruino in JavaScript.
For a project, I am trying to get the tilt angle of the device measured in degrees with a value between 0 and 360. At the moment, however, I'm not succeeding and looking on the internet I found this documentation:
Do you have any code to which I can get information for this problem? I tried to use equation 2 but it doesn't give me back the angle. I also tried equation 6 but it doesn't work.
The values I can take from the accelerometer are values in mg.
Here is the photo:

Do you know how to help me?
Thanks.

