Sonar versus Distance Sensor (NXT++)
Posted: 03 Jun 2011, 14:00
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?
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?