In Reply to: Using optics to measure angle to wall? posted by Justin on 01/22/03 at 4:43 PM:
I think you could do it with three infrared distance sensors, depending on from how far away you must find the angle. Configure them in an L shape, make sure you know the distance from sensor 1 (S1), sensor 2 (S2), and sensor 3 (S3).
The horizontal angle would be something like
theta = tan^-1(b/(L3-L2))
where b is the distance between S2 and S3, L2 is the distance between S2 and the wall, and L3 is the distance between S3 and the wall.
Sharp's GP2D02 and GP2D12 distance sensors might be suitable. They both have analog output. I don't remember which one I used, but it put out .5V to 3V DC. I think they make a serial digital one as well, but I don't know the part number.
Just because I'm not sure if html works on this board.