|
Re: Syntax Error!
The conversion factor is roughly 0.01745 I'll use that instead of defining it, it works, it's easier, unless there's some reason that I shouldn't. I'm pretty new to programming, and I'm always glad to learn.
tilt_angle_rad = (0.01745) * (((TILT_SERVO - 144) * 25)/50);
but anyways, we already checked and the angle is correct. Yet I'm getting like -166.25 meters for the light that is like 2.5 meters away.... My friend said it maybe that it may be overflow, so I changed everything from floating points to integers, I'll test, see how it goes. Thanks alot of the help!
What does the f after the 180.0 and the pi mean?
Last edited by Denz : 04-02-2006 at 02:26.
|