Sonar versus Distance Sensor (NXT++)

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
boxer41a
Posts: 9
Joined: 13 May 2011, 10:55

Sonar versus Distance Sensor (NXT++)

Post by boxer41a »

This question is in the context of the NXT++ library.

What is the deference between a sonar sensor and a distance sensor? A search for both terms seems to end up with the T-shaped, two "eyed" sensor that came with the mindstorms kit.

Under "enum SensorType" there is Touch, Sound, Light, ActiveLight, and Sonar; under namespace "Sensor" there are features: SetTouch, SetSound, SetLight, and SetSonar which intuitively seem related to the SensorType. However, I am confused about this:
SetSonar // Sets the sensor in a specified port to a sonar sensor
versus
SetDistNx // Sets a sensor in a specified port to a Mind Storms Distance sensor

Do GetDistNxValue and GetCleanDistNxValue apply to the distance sensor as well as the [what ever it is] sonar sensor?

Also, what about:
SetCmpsNx // Sets a sensor in a specified port to a Mind Storms Compass sensor
Should there be an enumerated type corresponding to this sensor type?
pbenco
Posts: 71
Joined: 29 Sep 2010, 09:43
Contact:

Re: Sonar versus Distance Sensor (NXT++)

Post by pbenco »

Hello boxer41a

You seem not very aware of the mindsensors products: http://www.mindsensors.com/index.php?mo ... PAGE_id=72
The lego company sells various sensors under their own license, as the touch, sound, light, color sensors, but some extra companies actually sell various sensor, directly compatible with the nxt, as mindsensors, hitechnic, vernier, etc...
the distance sensor you are searching seems to be the one designed by mindsensors, using sharp infrared sensors, and knowed as "distance sensor"
Best regards
Ben
pbenco.wordpress.com/
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest