Quote Originally Posted by B-O Eliasson View Post
The problem is solved. I found another version of trig.inc in post 13, and it works well for me. I have to put the word variables x,y into long variables before doing any calculations on them.
That's a good bare bones cordic version as long as you don't mind manipulating the radians. So you could either use that and do math to your liking, or you could use TrigL , which you can find with my tilt example here: http://www.picbasic.co.uk/forum/cont...-axis-g-sensor . If you use TrigL.inc, you would probably want to add a line to replace goto main with goto overcordic
and at the end of the TrigL.inc add a line overcordic:

Keep us posted, I'd love to see your project.

Walter