Hello,
I am wanting to make a 2-axis digital level with a 2 axis (x,y) accelerometer. The level will give you the degree of tilt for the x plane (tilt left/right) and the y plane (tilt up/down). I know how to do most of it, except one small math problem.
If both planes are tilted at the same time, say both are at 45 degrees one way or the other in real life, my readings are actually lower because neither axis is perpendicular to gravity anymore. Is there some math I can apply to this problem to give me the correct, real angle for each axis? I am assuming the code will involve some sort of sine/cosine calls, is it possible to do those in a PIC16?
Thank You,
Fred