Question about LEGO Ultrasonic Sensor functionality



I have a question about the LEGO Mindstorms NXT Ultrasonic Sensor functionality, I understand that the sensor can measure the distance an object is at from it, but is there a command so that the sensor can measure at what angle relative to itself that particular object is? I’ve noticed while playing around with the sensor that even if an object is not placed in the front of the sensor’s path (slightly off to the right or left), the sensor still sees that it is there. It would be very useful to me if I could make the sensor tell me at what angle left or right the object is at besides its distance from the sensor.

Thank you for your help


short answer: no, the ultrasonic sensor mesasures just distances.

long answer: it measures ultrasonic sound reflexions of objects straight ahead within a certain angle (perhaps 10 degrees left+right or sth like that); so turning the sensor to the left or right side like a radar antenna, you may poll the possibly closest distances to either bearing angle additionally to straight ahead. But don’t expect miracles though. :wink:


I see, thank you for your help!