Changeset 303 for branches/atorf/RWTHMindstormsNXT/GetUltrasonic.m
- Timestamp:
- 09/25/08 16:51:10 (5 years ago)
- Files:
-
- 1 modified
-
branches/atorf/RWTHMindstormsNXT/GetUltrasonic.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/atorf/RWTHMindstormsNXT/GetUltrasonic.m
r299 r303 10 10 % |distance = GetUltraSonic(port)| returns the current measurement value |distance| of the NXT 11 11 % ultrasonic sensor. |distance| represents the measured distance in cm. 12 % If no echo can be detected (which could indicate that either there is 13 % no obstacle in the way, or the ultrasound does not get reflected, e.g. 14 % by fur-like surfaces), the reading will be 255. If no measurement can 15 % be made (defect sensor, cable disconnected, etc.), a value of -1 will 16 % be returned. 17 % 12 18 % The given |port| number specifies the connection port. The value |port| can be 13 19 % addressed by the symbolic constants |SENSOR_1| , |SENSOR_2|, |SENSOR_3| and |SENSOR_4| analog to
