Hi Walter, I have been looking at this for some time now and keep coming back to this post. I am actually attempting to do a similar project to the tilt sensor project which you have built only on a single axis. I believe I am almost there now and just need a few pointers! I am looking at your code atn2. the following is the equation i require to solve: tan-1 ((zresult - calval)/SQR ((5017 - calval)^2 - (zresult - calval)^2))
Now from reading your posts would I be right in thinking that if i do the following:
Code:
x=0
y= ((zresult - calval)/SQR ((5017 - calval)^2 - (zresult - calval)^2))
call atn2
Am I right in thinking that this would convert my equation as I am not interested in the hyp or does the x vaule come into play?
Bookmarks