Quote:
Originally Posted by paulcd2000
but how can you convert tilt servo values into degrees. sorry, i'm kinda tired, so i might be being dense
EDIT: Would this work?
Code:
angle= (TILT_SERVO-STOP)*0.75757575;
distance = HEIGHT_DIFF/atan(angle);
.757575... is the degrees per servo step
|
I am pretty sure you want
tan() and not
atan()
Good luck,
Robinson