I have an ultra-sonic range finder mounted on a servo.
the servo goes 0 to 180 deg say with servo values of 75 to 225.
I want to draw the range in a semi-circle, bit like a radar.
The screen will be x 0 to 63, y 0 to 63. please see diagram.
I need to convert the servo angle to degrees and from the right angle triangle and cos and sine work out the opposite and adjacent sides which will be the x,y end points which will be connected.
I hope someone who didn't spend so much time looking out the window in school as me could help because picaxe sines and cosines aren't normal and sums hurt my head and Wales are playing England where I live right now.
I drew a sketch but can't upload it,720K jpeg?
the servo goes 0 to 180 deg say with servo values of 75 to 225.
I want to draw the range in a semi-circle, bit like a radar.
The screen will be x 0 to 63, y 0 to 63. please see diagram.
I need to convert the servo angle to degrees and from the right angle triangle and cos and sine work out the opposite and adjacent sides which will be the x,y end points which will be connected.
I hope someone who didn't spend so much time looking out the window in school as me could help because picaxe sines and cosines aren't normal and sums hurt my head and Wales are playing England where I live right now.
I drew a sketch but can't upload it,720K jpeg?