Skip to content

Latest commit

 

History

History
82 lines (77 loc) · 2.25 KB

LEGO-NXT-Ultrasonic-Sensor-(9846).md

File metadata and controls

82 lines (77 loc) · 2.25 KB

General

This sensor uses the [[msensor|Using the Mindstorms Sensor Device Class]] device class.

Value
type_id 5
# Modes 5
Connection I2C/M
Vendor ID LEGO
Product ID Sonar

Modes

Mode 0 Mode 1 Mode 2 Mode 3 Mode 4
mode NXT-US-CM NXT-US-IN NXT-US-SI-CM NXT-US-SI-IN NXT-US-LIST
Description Continuous measurement Continuous measurement Single measurement Single measurement Listen
num_values 1 1 1 1 1
value0 Distance Distance Distance1 Distance1 Presence of another ultrasonic sensor
 Min 0 (0.0 cm) 0 (0.0 in) 0 (0.0 cm) 0 (0.0 in) 0 (no other sensors detected)
 Max 255 (255.0 cm) 1000 (100.0 in) 255 (255.0 cm) 1000 (100.0 in) 1 (another ultrasonic sensor was detected)
units cm (centimeters) in (inches) cm (centimeters) in (inches) none
dp (decimal places) 0 1 0 1 0
Values in the tables that look like ```this``` are the names of sysfs attributes or values returned by said attributes.

[1]: The value is read when the mode is set and does not change - even when polling is enabled. To read a new value, set the mode again (e.g. echo NXT-US-SI-CM > mode).