Accelerometer: get a value as angle (pitch and roll)

Hello,

Maybe this STMicro article about 3-axis sensing, especially equations 6. and 7. would help?

Or maybe you could drop the angleBetweenVectorComponentAndAxis as it seems that the original code meant “Acceleration of axis x in g”, which is actually the same raw value which RuuviTag gives