Appendix A: Sensor Data

This page contains sensor-specific data for each type of supported sensor.

Generic EV3 Analog Sensor

General Info

Driver Name ev3-analog-XX
Connection Type EV3/Analog
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
ANALOG Raw analog value V (volts) 3 1 value0: Voltage (0 - 5000)

Commands

This sensor does not support commands.

Generic NXT Analog Sensor

General Info

Driver Name nxt-analog
Connection Type NXT/Analog
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
ANALOG-0 Raw analog value V (volts) 3 1 value0: Voltage (0 - 5000)
ANALOG-1 Raw analog value - pin 5 high V (volts) 3 1 value0: Voltage (0 - 5000)

Commands

This sensor does not support commands.

Charmed Labs Pixy (CMUcam5) for LEGO

General Info

Driver Name pixy-lego
Website charmedlabs.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID Pixy
Product ID Pixy
Number of Modes 8

Modes

Mode Description Units Decimals Num. Values Values
ALL All none 0 6

value0: Signature low byte

value1: Signature high byte

value2: X

value3: Y

value4: Width

value5: Height

SIG1 Signature #1 none 0 5

value0: Count

value1: X

value2: Y

value3: Width

value4: Height

SIG2 Signature #2 none 0 5

value0: Count

value1: X

value2: Y

value3: Width

value4: Height

SIG3 Signature #3 none 0 5

value0: Count

value1: X

value2: Y

value3: Width

value4: Height

SIG4 Signature #4 none 0 5

value0: Count

value1: X

value2: Y

value3: Width

value4: Height

SIG5 Signature #5 none 0 5

value0: Count

value1: X

value2: Y

value3: Width

value4: Height

SIG6 Signature #6 none 0 5

value0: Count

value1: X

value2: Y

value3: Width

value4: Height

SIG7 Signature #7 none 0 5

value0: Count

value1: X

value2: Y

value3: Width

value4: Height

Commands

This sensor does not support commands.

Dexter Industries Flexible Sensor for Mindstorms NXT

General Info

Driver Name di-dflex
Website www.dexterindustries.com
Connection Type NXT/Analog
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
FLEX Flex none 0 1 value0: Flex (0-100)

Commands

This sensor does not support commands.

Fatcatlab 9DOF Sensor

General Info

Driver Name fcl-9dof
Website fatcatlab.com
Connection Type EV3/UART
Number of Modes 3

Modes

Mode Description Units Decimals Num. Values Values
GYRO Gyroscope d/s (degrees per second) 1 3

value0: X-axis rotational speed (-20000 to 20000)

value1: Y-axis rotational speed (-20000 to 20000)

value2: Z-axis rotational speed (-20000 to 20000)

ACC Accelerometer g (standard gravity) 3 3

value0: X-axis acceleration (-16000 to 16000)

value1: Y-axis acceleration (-16000 to 16000)

value2: Z-axis acceleration (-16000 to 16000)

MAGNET Magnetometer uT (microteslas) 0 3

value0: X-axis magnetic flux density (-4800 to 4800)

value1: Y-axis magnetic flux density (-4800 to 4800)

value2: Z-axis magnetic flux density (-4800 to 4800)

Commands

This sensor does not support commands.

Fatcatlab ADC Adapter

General Info

Driver Name fcl-adc
Website fatcatlab.com
Connection Type EV3/UART
Number of Modes 3

Modes

Mode Description Units Decimals Num. Values Values
CH1-VOLTAGE Channel 1 mV (millivolts) 0 1 value0: Voltage (0 to 3300)
CH2-VOLTAGE Channel 2 mV (millivolts) 0 1 value0: Voltage (0 to 3300)
VOLTAGE Both Channels mV (millivolts) 0 2

value0: Channel 1 Voltage (0 to 3300)

value1: Channel 2 Voltage (0 to 3300)

Commands

This sensor does not support commands.

Fatcatlab Altitude Sensor

General Info

Driver Name fcl-altitude
Website fatcatlab.com
Connection Type EV3/UART
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
PRESSURE Pressure hPa (hectopascals) 1 1 value0: Pressure (3000 to 11000)
ALTITUDE Altitude m (meters) 1 1 value0: Altitude (-5000 to 90000)

Commands

This sensor does not support commands.

Fatcatlab Gesture Sensor

General Info

Driver Name fcl-gesture
Website fatcatlab.com
Connection Type EV3/UART
Number of Modes 4

Modes

Mode Description Units Decimals Num. Values Values
GESTURE Gesture none 0 1 value0: Gesture (0 to 6) [1]
PROXIMITY Proximity none 0 1 value0: Voltage (0 to 127)
RGB-RAW Color none 0 3

value0: Red

value1: Green

value2: Blue

CLEAR [2] Clear none 0 1 value0: Always 1

Commands

This sensor does not support commands.

Notes

[1]

Gesture Values:

Value Description
0 none
1 left
2 right
3 up
4 down
5 near
6 far
[2]The CLEAR mode is used to reset the value of the GESTURE mode back to zero.

Fatcatlab Humidity Sensor

General Info

Driver Name fcl-humidity
Website fatcatlab.com
Connection Type EV3/UART
Number of Modes 3

Modes

Mode Description Units Decimals Num. Values Values
CENTIGRADE Temperature (Celsius) C (degrees Celsius) 1 1 value0: Temperature (-400 to 1250)
FAHRENHEIT Temperature (Fahrenheit) F (degrees Fahrenheit) 1 1 value0: Temperature (-400 to 2570)
HUMIDITY Humidity %RH (percent relative humidity) 1 1 value0: Humidity (0 to 1000)

Commands

This sensor does not support commands.

Fatcatlab IR Receiver

General Info

Driver Name fcl-ir
Website fatcatlab.com
Connection Type EV3/UART
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
IR DATA IR Remote Control none 0 1 value0: Channel 1 (0 to 60) [3]

Commands

This sensor does not support commands.

Notes

[3]

Button values:

Value Button
0 none
1-9 1-9 (digits)
10 0 (zero)
11 + (plus)
12 - (minus)
13 ⏮ (previous)
14 ⏭ (next)
15 ⏯ (play/pause)
21 OK
22 ↰ (back)
30 ⏻ (power)
40 MENU
50 🔇 (mute)
60 MODE

Fatcatlab Light Sensor

General Info

Driver Name fcl-light
Website fatcatlab.com
Connection Type EV3/UART
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
ILLUMINANCE Illuminance lx (lux) 0 1 value0: Illuminance (0 to 65535)

Commands

This sensor does not support commands.

HiTechnic NXT Color Sensor

General Info

Driver Name ht-nxt-color
Connection Type NXT/I2C
Default Address 0x01
Vendor ID HiTechnc
Product ID Color
Number of Modes 7

Modes

Mode Description Units Decimals Num. Values Values
COLOR Color none 0 1 value0: Color (0 to 17) [4]
RED Red component none 0 1 value0: Reflected light intensity (0 to 255)
GREEN Green component none 0 1 value0: Reflected light intensity (0 to 255)
BLUE Blue component none 0 1 value0: Reflected light intensity (0 to 255)
RAW Raw values none 0 3

value0: Red Component (0 to 255)

value1: Green Component (0 to 255)

value2: Blue Component (0 to 255)

NORM Normalized values none 0 4

value0: Red Component (0 to 255)

value1: Green Component (0 to 255)

value2: Blue Component (0 to 255)

value3: ??? Component (0 to 255)

ALL All values none 0 4

value0: Color (0 to 17) [4]

value1: Red Component (0 to 255)

value2: Green Component (0 to 255)

value3: Blue Component (0 to 255)

Commands

This sensor does not support commands.

Notes

[4](1, 2)

Color Values:

Color chart

HiTechnic NXT Angle Sensor

General Info

Driver Name ht-nxt-angle
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID HITECHNC
Product ID AnglSnsr
Number of Modes 3

Modes

Mode Description Units Decimals Num. Values Values
ANGLE Angle deg (degrees) 0 1 value0: Angle (0 to 359)
ANGLE-ACC Accumulated angle deg (degrees) 0 1 value0: Angle (-2147483648 to 2147483647)
SPEED Rotational speed RPM (revolutions per minute) 0 1 value0: Angle (-32768 to 32768)

Commands

Command Description
RESET Reset accumulated angle
CAL [5] Reset angle and accumulated angle and save to EEPROM

Notes

[5]When Calibrating the sensor wait least 25ms before further reads from the sensor. That means disable polling by setting poll_ms to 0 before sending this command.

HiTechnic NXT Acceleration / Tilt Sensor

General Info

Driver Name ht-nxt-accel
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID HITECHNC
Product ID Accel.
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
ACCEL Single-axis acceleration none 0 1 value0: Acceleration (coarse value) [6]
ALL Three-axis acceleration none 0 6

value0: X-axis acceleration (most significant byte)

value1: Y-axis acceleration (most significant byte)

value2: Z-axis acceleration (most significant byte)

value3: X-axis acceleration (least significant byte) [7]

value4: Y-axis acceleration (least significant byte) [7]

value5: Z-axis acceleration (least significant byte) [7]

Commands

This sensor does not support commands.

Notes

[6]Value is 8 most significant bits out of 10-bit total resolution.
[7](1, 2, 3) Only the 2 most significant bits are used. Actual value is MSB << 2 + LSB >> 6 or MSB << 2 + LSB & 0x03 (can someone confirm which one?).

HiTechnic NXT Barometric Sensor

General Info

Driver Name ht-nxt-barometric
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID HiTechnc
Product ID Barometr
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
PRESS Barometric Pressure m (???) 1 1 value0: Absolute Pressure (0 to 3000)
TEMP Temperature C (degrees Celsius) 1 1 value0: Absolute Pressure (0 to 1000)

Commands

This sensor does not support commands.

HiTechnic NXT Color Sensor V2

General Info

Driver Name ht-nxt-color-v2
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID HiTechnc
Product ID ColorPD
Number of Modes 9

Modes

Mode Description Units Decimals Num. Values Values
COLOR Color none 0 1 value0: Color (0 to 17) [8]
RED Red component none 0 1 value0: Reflected light intensity (0 to 255)
GREEN Green component none 0 1 value0: Reflected light intensity (0 to 255)
BLUE Blue component none 0 1 value0: Reflected light intensity (0 to 255)
WHITE White component none 0 1 value0: Reflected light intensity (0 to 255)
NORM Normalized values none 0 4

value0: Red Component (0 to 255)

value1: Green Component (0 to 255)

value2: Blue Component (0 to 255)

value3: White Component (0 to 255)

ALL All values none 0 5

value0: Red Component (0 to 255)

value1: Green Component (0 to 255)

value2: Blue Component (0 to 255)

value3: White Component (0 to 255)

value4: ??? (0 to 255)

PASSIVE Passive values none 0 4

value0: Red Component (0 to 255?)

value1: Green Component (0 to 255?)

value2: Blue Component (0 to 255?)

value3: White Component (0 to 255?)

RAW Raw values none 0 4

value0: Red Component (0 to 255?)

value1: Green Component (0 to 255?)

value2: Blue Component (0 to 255?)

value3: White Component (0 to 255?)

Commands

This sensor does not support commands.

Notes

[8]

Color Values:

Color chart

HiTechnic NXT EOPD

General Info

Driver Name ht-nxt-eopd
Website www.hitechnic.com
Connection Type NXT/Analog
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
LONG Proximity (long range) none 0 1 value0: Proximity (0-100) [9]
SHORT Proximity (short range) none 0 1 value0: Proximity (0-100) [9]

Commands

This sensor does not support commands.

Notes

[9](1, 2) This value is the square root of the raw value. You can derive a value proportional (linear) to distance by dividing a constant by this value, e.g. 35 / value0.

HiTechnic NXT Force Sensor

General Info

Driver Name ht-nxt-force
Website www.hitechnic.com
Connection Type NXT/Analog
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
FORCE Raw value (non-linear) none 0 1 value0: (0-1023)

Commands

This sensor does not support commands.

HiTechnic NXT Gyro Sensor

General Info

Driver Name ht-nxt-gyro
Website www.hitechnic.com
Connection Type NXT/Analog
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
GYRO Angular speed d/s (degrees per second) 0 1 value0: Angular speed (-540 to 400)

Commands

This sensor does not support commands.

HiTechnic NXT IRReceiver Sensor

General Info

Driver Name ht-nxt-ir-receiver
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID HiTechnc
Product ID IRRecv
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
1-MOTOR Single Motor Control pct (percent) 0 1 value0: Motor 1A Speed (-128 and -100 to 100) [10] [11]
8-MOTOR Eight Motor Controls pct (percent) 0 8

value0: Motor 1A Speed (-128 and -100 to 100) [10] [11]

value1: Motor 1B Speed (-128 and -100 to 100) [10] [11]

value2: Motor 2A Speed (-128 and -100 to 100) [10] [11]

value3: Motor 2B Speed (-128 and -100 to 100) [10] [11]

value4: Motor 3A Speed (-128 and -100 to 100) [10] [11]

value5: Motor 3B Speed (-128 and -100 to 100) [10] [11]

value6: Motor 4A Speed (-128 and -100 to 100) [10] [11]

value7: Motor 4B Speed (-128 and -100 to 100) [10] [11]

Commands

This sensor does not support commands.

Notes

[10](1, 2, 3, 4, 5, 6, 7, 8, 9) Value of -128 is brake. Speed values only occur in discrete steps (-100, -86, -72, -58, -44, -30, -16, 0, 16, 30, 44, 58, 72, 86 and 100).
[11](1, 2, 3, 4, 5, 6, 7, 8, 9) In the description, “Motor NX”, the number N is the channel, and the letter X is the channel. “A”” is the red/left control and “B”” is the blue/right control.

HiTechnic NXT PIR Sensor

General Info

Driver Name ht-nxt-pir
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID HITECHNC
Product ID PIR
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
PROX IR Proximity pct (percent) 0 1 value0: Proximity (-100 to 100)

Commands

This sensor does not support commands.

HiTechnic NXT Compass Sensor

General Info

Driver Name ht-nxt-compass
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID HITECHNC (or HiTechnc)
Product ID Compass
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
COMPASS Compass Direction deg (degrees) 0 1 value0: Direction (0 to 359)

Commands

This sensor does not support commands.

HiTechnic NXT Magnetic Sensor

General Info

Driver Name ht-nxt-mag
Website www.hitechnic.com
Connection Type NXT/Analog
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
MAG Magnetic field??? none 0 1 value0: ???

Commands

This sensor does not support commands.

HiTechnic NXT IRSeeker V2

General Info

Driver Name ht-nxt-ir-seek-v2
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x08
Vendor ID HiTechnc
Product ID NewIRDir
Number of Modes 4

Modes

Mode Description Units Decimals Num. Values Values
DC Direction (unmodulated) none 0 1 value0: Direction (0 to 9) [12]
AC Direction (modulated) none 0 1 value0: Direction (0 to 9) [12]
DC-ALL All values (unmodulated) none 0 7

value0: Direction (0 to 9) [12]

value1: Sensor 1 signal strength (0 to 9) [12]

value2: Sensor 2 signal strength (0 to 9) [12]

value3: Sensor 3 signal strength (0 to 9) [12]

value4: Sensor 4 signal strength (0 to 9) [12]

value5: Sensor 5 signal strength (0 to 9) [12]

value6: Sensor mean (0 to 9) [12]

AC-ALL All values (modulated) none 0 6

value0: Direction (0 to 9) [12]

value1: Sensor 1 signal strength (0 to 9) [12]

value2: Sensor 2 signal strength (0 to 9) [12]

value3: Sensor 3 signal strength (0 to 9) [12]

value4: Sensor 4 signal strength (0 to 9) [12]

value5: Sensor 5 signal strength (0 to 9) [12]

Commands

This sensor does not support commands.

Notes

[12](1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)

Direction values:

Value Description
0 No signal
1 Far left
 
5 Center
 
9 Far right

HiTechnic NXT Sensor Multiplexer

General Info

Driver Name ht-nxt-smux
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x08
Vendor ID HiTechnc
Product ID SensrMUX
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
MUX Status none 0 2

value0: Run state [13]

value1: Status [14]

Commands

Command Description
HALT Halt
DETECT [15] [16] Start auto-detection
RUN Run

Notes

[13]

Run state:

Value Description
0 Halt
1 Detect
2 Run
[14]

Status bits:

Bit Description
0 Low/no battery
1 Running
2 Halted
3 Error
[15]The sensor mux must be halted before sending the detect command, otherwise it will result an error (-EPERM).
[16]

Only these sensors can be automatically detected:

  • LEGO NXT Ultrasonic
  • HiTechnic NXT Compass
  • HiTechnic NXT Color
  • HiTechnic NXT Acceleration / Tilt
  • HiTechnic NXT IR Seeker
  • HiTechnic Super Pro
  • HiTechnic NXT Color V2
  • HiTechnic NXT IR Seeker V2

HiTechnic NXT SuperPro Prototype Board

General Info

Driver Name ht-super-pro
Website www.hitechnic.com
Connection Type NXT/I2C
Default Address 0x08
Vendor ID HiTechnc
Product ID SuperPro
Number of Modes 5

Modes

Mode Description Units Decimals Num. Values Values
AIN Analog inputs none 0 4

value0: Analog input A0 (0 to 1023)

value1: Analog input A1 (0 to 1023)

value2: Analog input A2 (0 to 1023)

value3: Analog input A3 (0 to 1023)

DIN Digital inputs none 0 1 value0: Bits B0-B7 (0 to 255)
DOUT Digital outputs none 0 1 value0: Bits B0-B7 (0 to 255)
DCTRL Digital input/output controls none 0 1 value0: Bits B0-B7 (0 to 255)
STROBE Strobe output none 0 1 value0: Bits S0-S3 (0 to 15)
LED LED control none 0 1 value0: LED state [17]
AOUT-0 Analog output O0 none 0 5

value0: Mode

value1: Frequency, most significant byte

value2: Frequency, least significant byte

value3: Voltage, most significant byte

value4: Voltage, least significant byte

AOUT-1 Analog output O1 none 0 5

value0: Mode

value1: Frequency, most significant byte

value2: Frequency, least significant byte

value3: Voltage, most significant byte

value4: Voltage, least significant byte

Commands

This sensor does not support commands.

Notes

[17]

LED states:

Value Description
0 None
1 Red
2 Blue
3 Red and blue

LEGO EV3 Ultrasonic Sensor

General Info

Driver Name lego-ev3-us
Website education.lego.com
Connection Type EV3/UART
Number of Modes 7

Modes

Mode Description Units Decimals Num. Values Values
US-DIST-CM Continuous measurement - sets LEDs on, steady cm (centimeters) 1 1 value0: Distance (0-2550)
US-DIST-IN Continuous measurement - sets LEDs on, steady in (inches) 1 1 value0: Distance (0-1003)
US-LISTEN Listen - sets LEDs on, blinking none 0 1 value0: Presence (0-1) [18]
US-SI-CM Single measurement - LEDs on momentarily when mode is set, then off cm (centimeters) 1 1 value0: Distance (0-2550) [19]
US-SI-IN Single measurement - sets LED on momentarily when mode is set, then off in (inches) 1 1 value0: Distance (0-1003) [19]
US-DC-CM [20] ??? - sets LEDs on, steady cm (centimeters) 1 1 value0: Distance (0-2550)
US-DC-IN [20] ??? sets LEDs on, steady in (inches) 1 1 value0: Distance (0-1003)

Commands

This sensor does not support commands.

Notes

[18]A value of 1 indicates that another ultrasonic sensor has been detected. A 1 can also be triggered by a loud noise such as clapping.
[19](1, 2) A measurement is taken when the mode is set and value0 will not change after this. To take another measurement set the mode again. NOTE: If you write the mode too frequently (e.g. every 100msec), the sensor will sometimes lock up and writing to the mode attribute will return an error. A delay of 250msec between each write to the mode attribute seems sufficient to keep the sensor from locking up.
[20](1, 2) Not sure what DC mode stands for. Seems to work like the continuous measurement modes.

LEGO EV3 Gyro Sensor

General Info

Driver Name lego-ev3-gyro
Website education.lego.com
Connection Type EV3/UART
Number of Modes 5

Modes

Mode Description Units Decimals Num. Values Values
GYRO-ANG [21] Angle deg (degrees) 0 1 value0: Angle (-32768 to 32767) [22] [23]
GYRO-RATE [24] Rotational Speed d/s (degrees per second) 0 1 value0: Rotational Speed (-440 to 440) [23]
GYRO-FAS Raw sensor value ??? none 0 1 value0: ??? (-1464 to 1535) [23]
GYRO-G&A [21] [24] Angle and Rotational Speed none 0 2

value0: Angle (-32768 to 32767) [22] [23]

value1: Rotational Speed (-440 to 440) [23]

GYRO-CAL Calibration ??? none 0 4

value0: ???

value1: ???

value2: ???

value3: ???

Commands

This sensor does not support commands.

Notes

[21](1, 2) The angle in GYRO-ANG or GYRO-G&A modes can be reset by changing to a different mode and changing back.
[22](1, 2) If you spin around too many times in GYRO-ANG or GYRO-G&A mode, it will get stuck at 32767 or overflow through -32768 depending on when the sensor was manufactured.
[23](1, 2, 3, 4, 5) Clockwise is positive when looking at the side of the sensor with the arrows.
[24](1, 2) The sensor is calibrated when the GYRO-RATE or the GYRO-G&A mode is set. If the sensor is moving when setting the mode, the calibration will be off.

LEGO EV3 Color Sensor

General Info

Driver Name lego-ev3-color
Website education.lego.com
Connection Type EV3/UART
Number of Modes 6

Modes

Mode Description Units Decimals Num. Values Values
COL-REFLECT Reflected light - sets LED color to red pct (percent) 0 1 value0: Reflected light intensity (0 to 100)
COL-AMBIENT Ambient light - sets LED color to blue (dimly lit) pct (percent) 0 1 value0: Ambient light intensity (0 to 100)
COL-COLOR Color - sets LED color to white (all LEDs rapidly cycling) col (color) 0 1 value0: Detected color (0 to 7) [25]
REF-RAW Raw Reflected - sets LED color to red none 0 2

value0: ??? (0 to 1020???)

value1: ??? (0 to 1020???)

RGB-RAW Raw Color Components - sets LED color to white (all LEDs rapidly cycling) none 0 3

value0: Red (0 to 1020???)

value1: Green (0 to 1020???)

value2: Blue (0 to 1020???)

COL-CAL [26] Calibration ??? - sets LED color to red, flashing every 4 seconds, then goes continuous none 0 4

value0: ???

value1: ???

value2: ???

value3: ???

Commands

This sensor does not support commands.

Notes

[25]

Color values:

Value Color
0 none
1 black
2 blue
3 green
4 yellow
5 red
6 white
7 brown
[26]This mode is not usable. When in COL-CAL mode, the color sensor does not respond to the keep-alive sent from the EV3 brick. As a result, the sensor will time out and reset.

LEGO EV3 Touch Sensor

General Info

Driver Name lego-ev3-touch
Website education.lego.com
Connection Type EV3/Analog
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
TOUCH Button state none 0 1 value0: State (0 or 1) [27]

Commands

This sensor does not support commands.

Notes

[27]

Values:

Value Description
0 Released
1 Pressed

LEGO EV3 Infrared Sensor

General Info

Driver Name lego-ev3-ir
Website education.lego.com
Connection Type EV3/UART
Number of Modes 6

Modes

Mode Description Units Decimals Num. Values Values
IR-PROX Proximity pct (percent) 0 1 value0: Distance (0 to 100) [28]
IR-SEEK IR Seeker pct (percent) 0 8

value0: Channel 1 Heading (-25 to 25) [29]

value1: Channel 1 Distance (-128 and 0 to 100) [30] [31]

value2: Channel 2 Heading (-25 to 25) [29]

value3: Channel 2 Distance (-128 and 0 to 100) [30] [31]

value4: Channel 3 Heading (-25 to 25) [29]

value5: Channel 3 Distance (-128 and 0 to 100) [30] [31]

value6: Channel 4 Heading (-25 to 25) [29]

value7: Channel 4 Distance (-128 and 0 to 100) [30] [31]

IR-REMOTE IR Remote Control btn (button) 0 4

value0: Channel 1 (0 to 11) [32]

value1: Channel 2 (0 to 11) [32]

value2: Channel 3 (0 to 11) [32]

value3: Channel 4 (0 to 11) [32]

IR-REM-A IR Remote Control none 0 1 value0: Channel 1 [33]
IR-S-ALT [34] Alternate IR Seeker ??? pct (percent) 0 4

value0: ??? (0 to 100)

value1: ??? (0 to 100)

value2: ??? (0 to 100)

value3: ??? (0 to 100)

IR-CAL Calibration ??? none 0 2

value0: ??? (0 to 1023)

value1: ??? (0 to 1023)

Commands

This sensor does not support commands.

Notes

[28]100% is approximately 70cm/27in.
[29](1, 2, 3, 4) When looking in the same direction as the sensor, -25 is far left and +25 is far right.
[30](1, 2, 3, 4) 100% is approximately 200cm/78in.
[31](1, 2, 3, 4) The absence of a beacon on a channel can be detected when distance == -128 (and heading == 0).
[32](1, 2, 3, 4)

Button values:

Value Description
0 none
1 red up
2 red down
3 blue up
4 blue down
5 red up and blue up
6 red up and blue down
7 red down and blue up
8 red down and blue down
9 beacon mode on
10 red up and red down
11 blue up and blue down

red == left and blue == right

Pressing more that 2 buttons at one time is not supported. It will usually read 0. Pressing an up/down button while beacon mode is activated with turn off beacon mode.

[33]

Button values:

Value Blue Down Blue Up Red Down Red Up
262/384        
287       X
300     X  
309     X X
330   X    
339   X   X
352   X X  
377   X X X
390 X      
415 X     X
428 X   X  
437 X   X X
458 X X    
467 X X   X
480 X X X  
505 X X X X

X = button pressed

The most significant byte is always 0x01. In the least significant byte, the 4 most significant bits represent each button. Bit 7 is the blue down button, bit 6 is the blue up button, bit 5 is the red down button, bit 4 is the red up button. Beware that when no buttons are pressed, bit 7 is set (value == 384). You can test that bits 0-3 are all 0 to check this.

Example:

if ((value & 0x0F) == 0) {
    // no buttons are pressed
} else {
    if (value & 0x80)
        // blue down button is pressed
    if (value & 0x40)
        // blue up button is pressed
    if (value & 0x20)
        // red down button is pressed
    if (value & 0x10)
        // red up button is pressed
}

Bits 0-3 seem to be some sort of checksum or parity check. Bit 0 = bit 4, bit 1 = ~(bit 5), bit 2 = ~(bit 6), bit 3 = 0 if bits 0-2 are even or 1 if bits 0-2 are odd.

Also, when the beacon mode is active or for about 1 second after any button is released the value is 262.

This mode only works with the remote on channel 1.

[34]IR-S-ALT mode is not usable. When switching to this mode, the sensor quits responding to the keep-alive messages and the sensor resets.

LEGO WeDo USB Hub

General Info

Driver Name wedo-hub
Website education.lego.com
Connection Type USB
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
HUB Hub status none 0 2

value0: Status bits [35]

value1: Voltage (millivolts)

Commands

Command Description
OUT-OFF Turns off the outputs of the ports.
OUT-ON Turns on the outputs of the ports.
CLEAR-ERR Clears error.

Notes

[35]

Status Bits:

Bit Description
0 Echo
1  
2  
3  
4  
5  
6 High Power
7 Outputs Off

LEGO WeDo Motion Sensor

General Info

Driver Name wedo-motion
Website education.lego.com
Connection Type Wedo/Analog
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
PROX Proximity pct (percent) 0 1 value0: Proximity (0 - 100)
RAW Raw analog value none 0 1 value0: Proximity (0 - 255)

Commands

This sensor does not support commands.

LEGO WeDo Tilt Sensor

General Info

Driver Name wedo-tilt
Website education.lego.com
Connection Type Wedo/Analog
Number of Modes 3

Modes

Mode Description Units Decimals Num. Values Values
TILT Tilt status none 0 1 value0: Tilt (0 to 5) [36]
TILT-AXIS Tilt around 2 separate axes none 0 3

value0: Tilt Left/Right (-1/0/1) [37]

value1: Tilt Back/Front (-1/0/1) [37]

value2: Tilt value valid (0/1) [37]

RAW Raw analog value none 0 1 value0: Tilt (0 - 255) [38]

Commands

This sensor does not support commands.

Notes

[36]

Tilt values:

Value Description
0 Level
1 Front
2 Back
3 Left
4 Right
5 Unknown
[37](1, 2, 3)

Axis values:

Value0 Value1 Value2 Description
0 0 1 Level
0 1 1 Front
0 -1 1 Back
-1 0 1 Left
1 0 1 Right
0 0 0 Unknown
[38]

Raw values:

Value Description
0 Unknown
< 48 Back
< 99 Right
< 153 Level
< 204 Front
< 255 Left

LEGO Energy Display

General Info

Driver Name lego-power-storage
Website education.lego.com
Connection Type NXT/I2C
Default Address 0x02
Vendor ID LEGO
Product ID Store
Number of Modes 8

Modes

Mode Description Units Decimals Num. Values Values
IN-VOLT Input Voltage V (volts) 3 1 value0: Voltage (0 to 10000)
IN-AMP Input Current A (amps) 3 1 value0: Current (0 to 10000)
OUT-VOLT Output Voltage V (volts) 3 1 value0: Voltage (0 to 10000)
OUT-AMP Output Current A (amps) 3 1 value0: Current (0 to 10000)
JOULE Energy J (Joules) 0 1 value0: Energy (0 to 100)
IN-WATT Input Power W (Watts) 3 1 value0: Power (0 to 10000)
OUT-WATT Output Power W (Watts) 3 1 value0: Power (0 to 10000)
ALL All none 3 7

value0: Input Voltage (0 to 10000)

value1: Input Current (0 to 10000)

value2: Output Voltage (0 to 10000)

value3: Output Current (0 to 10000)

value4: Energy (0 to 100)

value5: Input Power (0 to 10000)

value6: Output Power (0 to 10000)

Commands

This sensor does not support commands.

LEGO NXT Temperature Sensor

General Info

Driver Name lego-nxt-temp
Website education.lego.com
Connection Type NXT/I2C
Default Address 0x4C
Vendor ID LEGO
Product ID Temp.
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
NXT-TEMP-C Continuous measurement C (°C) 1 1 value0: Temperature (-550 to 1280)
NXT-TEMP-F Continuous measurement F (°F) 1 1 value0: Temperature (-670 to 2624)

Commands

This sensor does not support commands.

LEGO NXT Touch Sensor

General Info

Driver Name lego-nxt-touch
Website shop.lego.com
Connection Type NXT/Analog
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
TOUCH Button state none 0 1 value0: State (0 or 1) [39]

Commands

This sensor does not support commands.

Notes

[39]

Values:

Value Description
0 Released
1 Pressed

LEGO NXT Light Sensor

General Info

Driver Name lego-nxt-light
Website shop.lego.com
Connection Type NXT/Analog
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
REFLECT Reflected light - LED on pct (percent) 1 1 value0: Reflected light intensity (0 to 1000)
AMBIENT Ambient light - LED off pct (percent) 1 1 value0: Ambient light intensity (0 to 1000)

Commands

This sensor does not support commands.

LEGO NXT Sound Sensor

General Info

Driver Name lego-nxt-sound
Website shop.lego.com
Connection Type NXT/Analog
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
DB Sound pressure level - Flat weighting pct (percent) 1 1 value0: Sound pressure level (0 to 1000)
DBA Sound pressure level - A weighting pct (percent) 1 1 value0: Sound pressure level (0 to 1000)

Commands

This sensor does not support commands.

LEGO NXT Ultrasonic Sensor

General Info

Driver Name lego-nxt-us
Website shop.lego.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID LEGO
Product ID Sonar
Number of Modes 5

Modes

Mode Description Units Decimals Num. Values Values
US-DIST-CM Continuous measurement cm (centimeters) 0 1 value0: Distance (0 to 255)
US-DIST-IN Continuous measurement in (inches) 1 1 value0: Distance (0 to 1000)
US-SI-CM Single measurement cm (centimeters) 0 1 value0: Distance (0 to 255) [40]
US-SI-IN Single measurement in (inches) 1 1 value0: Distance (0 to 1000) [40]
US-LISTEN Listen none 0 1 value0: Presence (0 or 1) [41]

Commands

This sensor does not support commands.

Notes

[40](1, 2) 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 US-SI-CM > mode).
[41]A value of 1 indicates that another ultrasonic sensor has been detected. A 1 can also be triggered by a loud noise such as clapping.

Microinfinity Digital Gyroscope And Accelerometer

General Info

Driver Name mi-xg1300l
Website www.minfinity.com
Connection Type NXT/I2C
Default Address 0x01
Vendor ID mnfinity [42]
Product ID XG1300L [42]
Number of Modes 4

Modes

Mode Description Units Decimals Num. Values Values
ANGLE Angle deg (degrees) 2 1 value0: Z-axis angle (-18000 to 18000)
SPEED Rotational speed d/s (degrees per second) 2 1 value0: Z-axis rotational speed
ACCEL Acceleration in X, Y, Z axis g (Standard gravity) [43] 3 3

value0: Acceleration in X axis

value1: Acceleration in Y axis

value2: Acceleration in Z axis

ALL All values none 0 5

value0: Z-axis angle (-18000 to 18000) [44]

value1: Z-axis rotational speed [45]

value2: X-axis acceleration [46]

value3: Y-axis acceleration [46]

value4: Z-axis acceleration [46]

Commands

Command Description
RESET [47] Reset device
ACCEL-2G Set accelerometer scaling to 2G
ACCEL-4G Set accelerometer scaling to 4G
ACCEL-8G Set accelerometer scaling to 8G

Notes

[42](1, 2)

CruizCore XG1300L doesn’t follow LEGO guidelines by returning vendor, product and firmware version values. As a result, this sensor can’t be automatically detected. Until we find another way to identify the sensor, the driver has to be loaded manually.

Register I2C device:

echo mi-xg1300l 0x01 > /sys/class/lego-port/port<N>/set_device
[43]\(1 g \approx 9.81 m/s^2\)
[44]Two decimal places
[45]Two decimal places
[46](1, 2, 3) Three decimal places, range as was set by last command
[47]Recalculate bias drift, reset accumulated angle, set accelerometer scaling factor to 2G, this has to be done with sensor not moving and is strongly recommended to be called manually before work.

mindsensors.com Gyro, MultiSensitivity Accelerometer and Compass

General Info

Driver Name ms-absolute-imu
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x11 [48]
Vendor ID mndsnsrs
Product ID AbsIMU
Number of Modes 6

Modes

Mode Description Units Decimals Num. Values Values
TILT Tilt deg (degrees) 0 3

value0: X-axis angle (0 to 180)

value1: Y-axis angle (0 to 180)

value2: Z-axis angle (0 to 180)

ACCEL [49] Acceleration g (Standard gravity) [50] 3 3

value0: X-axis acceleration

value1: Y-axis acceleration

value2: Z-axis acceleration

COMPASS [51] Compass deg (degrees) 0 1 value0: Heading (0 to 360)
MAG [51] Magnetic field none 0 3

value0: X-axis magnetic field

value1: Y-axis magnetic field

value2: Z-axis magnetic field

GYRO [52] Gyro d/s (degrees per second) 1 3

value0: X-axis rotational speed

value1: Y-axis rotational speed

value2: Z-axis rotational speed

ALL [53] All data none 0 23

value0:

value1:

value2:

value3:

value4:

value5:

value6:

value7:

value8:

value9:

value10:

value11:

value12:

value13:

value14:

value15:

value16:

value17:

value18:

value19:

value20:

value21:

value22:

Commands

Command Description
BEGIN-COMP-CAL Begin compass calibration
END-COMP-CAL End compass calibration
ACCEL-2G [54] Change accelerometer sensitivity to 2G and gyro sensitivity to 250 deg/sec
ACCEL-4G [54] Change accelerometer sensitivity to 4G and gyro sensitivity to 500 deg/sec
ACCEL-8G [54] Change accelerometer sensitivity to 8G and gyro sensitivity to 2000 deg/sec
ACCEL-16G [54] Change accelerometer sensitivity to 16G and gyro sensitivity to 2000 deg/sec

Notes

[48]The address is programmable. See manufacturer documentation for more information.
[49]Only returns data from models with an accelerometer (AbsoluteIMU-AC / AbsoluteIMU-A).
[50]Standard gravity (g) is defined as \(1 g = 9.81 m/s^2\)
[51](1, 2) Only returns data from models with a compass (AbsoluteIMU-C / AbsoluteIMU-AC / AbsoluteIMU-ACG).
[52]Only returns data from models with a gyro (AbsoluteIMU-ACG).
[53]Reads all data from the sensor. Use bin_data attribute to read values. Some values will not be scaled. See manufacturer docs for more info.
[54](1, 2, 3, 4) Wait 50 msec after sending command for sensor to reconfigure itself.

mindsensors.com GlideWheel-AS

General Info

Driver Name ms-angle
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x18
Vendor ID mndsnsrs
Product ID AngSens
Number of Modes 4

Modes

Mode Description Units Decimals Num. Values Values
ANGLE Angle deg (degrees) 0 1 value0: Angle
ANGLE2 High-precision angle deg (degrees) 1 1 value0: Angle
SPEED Rotational Speed rpm (revolutions per minute) 0 1 value0: Rotational Speed (-4000 to 4000)
ALL All values none 0 3

value0: Angle

value1: Angle x2 [55]

value2: Rotational Speed [56]

Commands

Command Description
RESET Reset angle values

Notes

[55]Angle value times 2 (i.e. value of 10 = angle of 5 degrees). Allows for 0.5 degree precision.
[56]Value needs to be converted to 16-bit signed integer. Example: if (value2 > 32767) value2 = value2 - 65536

mindsensors.com EV3 Sensor Multiplexer

General Info

Driver Name ms-ev3-smux
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x50, 0x51, 0x52 [57]
Vendor ID mndsnsrs
Product ID Ev3SMux
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
MUX [59] EV3 Sensor Multiplexer none 0 0  

Commands

This sensor does not support commands.

Notes

[57]This sensor appears as three separate sensors, one for each channel on the sensor mux.
[58]In addition to loading three [lego-sensor] devices for the sensor mux itself, three [lego-port] devices are added as well. These [ms-ev3-smux-port] devices must be used to manually specify the type of sensor that is attached to each port.
[59]This mode does not do anything useful.

mindsensors.com Light Sensor Array

General Info

Driver Name ms-light-array
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x0A [60]
Vendor ID mndsnsrs
Product ID LSArray
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
CAL Calibrated values pct (percent) 0 8

value0: LED 0 (0 to 100)

value1: LED 1 (0 to 100)

value2: LED 2 (0 to 100)

value3: LED 3 (0 to 100)

value4: LED 4 (0 to 100)

value5: LED 5 (0 to 100)

value6: LED 6 (0 to 100)

value7: LED 7 (0 to 100)

RAW Uncalibrated values none 0 8

value0: LED 0 (0 to ???)

value1: LED 1 (0 to ???)

value2: LED 2 (0 to ???)

value3: LED 3 (0 to ???)

value4: LED 4 (0 to ???)

value5: LED 5 (0 to ???)

value6: LED 6 (0 to ???)

value7: LED 7 (0 to ???)

Commands

Command Description
CAL-WHITE Calibrate white
CAL-BLACK Calibrate black
SLEEP [61] Put sensor to sleep
WAKE [62] Wake up the sensor
60HZ Configures sensor for 60Hz electrical mains
50HZ Configures sensor for 50Hz electrical mains
UNIVERSAL Configures sensor for any (50/60Hz) electrical mains

Notes

[60]The address is programmable. See manufacturer documentation for more information.
[61]poll_ms must be set to 0 in order for sensor to sleep.
[62]Will return an error (-ENXIO) if sensor is actually asleep. Completes successfully if sensor is already awake.

mindsensors.com Line Follower Sensor

General Info

Driver Name ms-line-leader
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x01 [63]
Vendor ID mndsnsrs
Product ID LineLdr
Number of Modes 4

Modes

Mode Description Units Decimals Num. Values Values
PID Line Follower pct (percent) 0 1 value0: Steering (-100 to 100) [64]
PID-ALL Line Follower - all values none 0 3

value0: Steering (-100 to 100) [64]

value1: Average (0 to 80) [65]

value2: Result (as bits) [66]

CAL Calibrated values pct (percent) 0 8

value0: LED 0 (0 to 100)

value1: LED 1 (0 to 100)

value2: LED 2 (0 to 100)

value3: LED 3 (0 to 100)

value4: LED 4 (0 to 100)

value5: LED 5 (0 to 100)

value6: LED 6 (0 to 100)

value7: LED 7 (0 to 100)

RAW Uncalibrated values none 0 8

value0: LED 0 (0 to ???)

value1: LED 1 (0 to ???)

value2: LED 2 (0 to ???)

value3: LED 3 (0 to ???)

value4: LED 4 (0 to ???)

value5: LED 5 (0 to ???)

value6: LED 6 (0 to ???)

value7: LED 7 (0 to ???)

Commands

Command Description
CAL-WHITE Calibrate white
CAL-BLACK Calibrate black
SLEEP [67] Put sensor to sleep
WAKE [68] Wake up the sensor
INV-COL Color inversion (White line on a black background)
RST-COL Reset Color inversion (black line on a white background).
SNAP [69] Take a snapshot.
60HZ Configures sensor for 60Hz electrical mains
50HZ Configures sensor for 50Hz electrical mains
UNIVERSAL Configures sensor for any (50/60Hz) electrical mains

Notes

[63]The address is programmable. See manufacturer documentation for more information.
[64](1, 2) “Steering” is the power value returned by the sensor to correct your course. Add this value to your left motor and subtract from right motor.
[65]“Average” is the weighted average of the sensor reading. The average is a weighted average of the bits set to 1 based on the position. i.e. left most bit has weight of 10, second bit has* weight of 20.
[66]“Result” is a byte value of the sensor reading. Each bit corresponding to the sensor where the line is seen is set to 1, or else the bit is zero.
[67]poll_ms must be set to 0 in order for sensor to sleep.
[68]Will return an error (-ENXIO) if sensor is actually asleep. Completes successfully if sensor is already awake.
[69]The “SNAP” command looks at the line under the sensor and stores the width and position of the line in sensor’s memory. Subsequently, sensor will use these characteristics of line to track it. This command inverts the colors if it sees a white line on black background. (PID parameters are not affected.)

mindsensors.com Vision Subsystem v4 for NXT or EV3

General Info

Driver Name ms-nxtcam
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x01 [70]
Vendor ID mndsnsrs
Product ID NXTCAM
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
TRACK [71] Tracking none 0 6

value0: Object count

value1: Color index

value2: X upper left

value3: Y upper left

value4: X lower right

value5: Y lower right

Commands

Command Description
TRACK-ON Enable tracking
TRACK-OFF Disable tracking
TRACK-OBJ Set to object tracking mode
TRACK-LINE Set to line tracking mode
SORT-SIZE Sort by size
SORT-COL Sort by color

Notes

[70]The address is programmable. See manufacturer documentation for more information.
[71]This driver only allows for tracking a single object. To track more than one object and for other more advanced uses, you can disable this driver by setting poll_ms to 0 and using the direct attribute to directly read and write I2C messages. See Appendix C: I2C Devices and the manufacturers documentation for more information.

mindsensors.com Vision Subsystem v5 for NXT or EV3 (with fixed lens)

General Info

Driver Name ms-nxtcam5
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x01 [72]
Vendor ID mndsnsrs
Product ID NXTcam5
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
TRACK [73] Tracking none 0 6

value0: Object count

value1: Color index

value2: X upper left

value3: Y upper left

value4: X lower right

value5: Y lower right

Commands

Command Description
TRACK-OBJ Select object tracking mode
TRACK-FACE Select face tracking mode
MULTI-MOVIE Begin capturing continuous movie (end by any other command)
MOVIE Capture short movie clip
PICTURE Capture still picture
TRACK-EYE Select eye tracking mode
TRACK-QR Select QR code tracking mode (future)
TRACK-LINE Select line tracking mode

Notes

[72]The address is programmable. See manufacturer documentation for more information.
[73]This driver only allows for tracking a single object. To track more than one object and for other more advanced uses, you can disable this driver by setting poll_ms to 0 and using the direct attribute to directly read and write I2C messages. See Appendix C: I2C Devices and the manufacturers documentation for more information.

mindsensors.com Multiplexer for NXT/EV3 Motors

General Info

Driver Name ms-nxtmmx
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x03 [74]
Vendor ID mndsnsrs
Product ID NxTMMX
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
STATUS Status V (volts) 3 1 value0: Battery voltage
STATUS-OLD [76] Status (for older firmware versions) V (volts) 3 1 value0: Battery voltage

Commands

This sensor does not support commands.

Notes

[74]The address is programmable. See manufacturer documentation for more information.
[75]The NxtMMX driver also loads two [tacho-motor] class devices. Use the tacho-motor class devices to actually control the motors. You can identify the motors by the address attribute. It will be in<X>:i2c<Y>:mux<Z> where <X> is 1-4, <Y> is 3 (unless you changed the address) and <Z> is 1 or 2 (matches M1 or M2 printed on the NxtMMX).
[76]The I2C register for battery voltage was changed for EV3 compatibility. If the STATUS mode does not seem to work, try this mode instead.

mindsensors.com 8-channel Servo Controller

General Info

Driver Name ms-8ch-servo
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x58 [77]
Vendor ID mndsnsrs
Product ID NXTServo
Number of Modes 2

Modes

Mode Description Units Decimals Num. Values Values
V3 EV3 Compatible V (volts) 3 1 value0: Battery voltage (0 to 9400) [79]
OLD [80] Older versions V (volts) 3 1 value0: Battery voltage (0 to 9400) [79]

Commands

This sensor does not support commands.

Notes

[77]The address is programmable. See manufacturer documentation for more information.
[78]The ms-8ch-servo driver loads separate servo motor devices (one for each of the 8 channels) in addition to the The lego-sensor Subsytem device. See the servo-motor Subsystem for more information. The servo-motor class address attribute will return in<X>:i2c<Y>:sv<Z> where <X> is the input port the servo controller is connected to, <Y> is the address and <Z> is the channel as indicated on the servo controller itself.
[79](1, 2) The current voltage scaling is based on the manufacturers documentation, however it seems to be low. If you are seeing this too, please open an issue on GitHub and we will change the scaling.
[80]Older versions of this sensor have the battery voltage at a different address. If the default mode does not return a value, try this mode.

mindsensors.com Sensor building kit for NXT with PCF8574 IC

General Info

Driver Name pcf8574
Website mindsensors.com
Connection Type Other/I2C
Default Address 0x38 [81]

Notes

[81]Valid addresses are 0x38..0x3F (configurable via input pins)
[82]

Sample usage:

Register I2C device:

echo pcf8574 0x38 > /sys/bus/i2c/devices/i2c-<port+2>/new_device

Finding device class node and initializing:

for chip in $(find /sys/class/gpio -name gpiochip*)
do
    if [[ "$(cat $chip/label)" == "pcf8547" ]]
    then
        base=$(cat $chip/base)
        # Pins are active low
        for i in {0..7}
        do
            gpio=$(($base + $i))
            echo $gpio > /sys/class/gpio/export
            # gpios on this chip are active low
            echo 1 > /sys/class/gpio/gpio$gpio/active_low
            # initialize direction here
        done
        # do whatever with the gpios
    fi
done

mindsensors.com Sensor building kit for NXT with PCF8591 IC

General Info

Driver Name pcf8591
Website mindsensors.com
Connection Type Other/I2C
Default Address 0x48 [83]

Notes

[83]Valid addresses are 0x48..0x4F (configurable via input pins)
[84]

Sample usage:

Register I2C device:

echo pcf8591 0x48 > /sys/bus/i2c/devices/i2c-<port+2>/new_device

Finding device class node:

for chip in $(find /sys/class/hwmon -name hwmon*)
do
    if [[ "$(cat $chip/device/name)" == "pcf8591" ]]
    then
        # do whatever
    fi
done

mindsensors.com Digital Pneumatic Pressure Sensor

General Info

Driver Name ms-pps58-nx
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x0C
Vendor ID mndsnsrs
Product ID PPS58
Number of Modes 7

Modes

Mode Description Units Decimals Num. Values Values
RAW Raw sensor value Pa 0 1 value0: Pressure (0 to 400,000 Pa)
ABS-PSI Absolute pressure (PSI) PSI (Pounds per square inch) 0 1 value0: Pressure (0 to 58 PSI)
ABS-MBAR Absolute pressure (millibar) mbar (millibar) 0 1 value0: Pressure (0 to 4000 millibar)
ABS-KPA Absolute pressure (kPa) kPa (kilopascals) 0 1 value0: Pressure (0 to 400 kPa)
REL-PSI Gauge pressure (PSI) PSI (Pounds per square inch) 0 1 value0: Pressure (0 to 58 PSI minus the reference pressure)
REL-MBAR Gauge pressure (millibar) mbar (millibar) 0 1 value0: Pressure (0 to 4000 millibar minus the reference pressure)
REL-KPA Gauge pressure (kPa) kPa (kilopascals) 0 1 value0: Pressure (0 to 400 kPa minus the reference pressure)

Commands

Command Description
ZERO [85] Change Reference pressure to current absolute pressure.

Notes

[85]The reference pressure is used to calculate the gauge pressure. Therefore, this command only affects the REL-* modes.

mindsensors.com Pixy Adapter for MINDSTORMS EV3 or NXT

General Info

Driver Name ms-pixy-adapter
Website www.mindsensors.com
Connection Type NXT/I2C
Default Address 0x01 [86]
Vendor ID mndsnsrs
Product ID PixyAdpt
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
TRACK [87] Tracking none 0 6

value0: Object count

value1: Color index

value2: X upper left

value3: Y upper left

value4: X lower right

value5: Y lower right

Commands

Command Description
SORT-SIZE Sort by size
SORT-COL Sort by color

Notes

[86]The address is programmable. See manufacturer documentation for more information.
[87]This driver only allows for tracking a single object. To track more than one object and for other more advanced uses, you can disable this driver by setting poll_ms to 0 and using the direct attribute to directly read and write I2C messages. See the [Using I2C Sensors] page and the manufacturers documentation for more information.

mindsensors.com Realtime Clock for NXT

General Info

Driver Name ds1307
Website mindsensors.com
Connection Type Other/I2C
Default Address 0x68

Notes

[88]

Sample usage:

Register I2C device:

echo ds1307 0x68 > /sys/bus/i2c/devices/i2c-<port+2>/new_device

Finding device class node:

for chip in $(find /sys/class/rtc -name rtc*)
do
    if [[ "$(cat $chip/name)" == "ds1307" ]]
    then
        # do whatever
    fi
done

mindsensors.com Touch Sensor Multiplexer for NXT & EV3

General Info

Driver Name ms-nxt-touch-mux
Website mindsensors.com
Connection Type NXT/Analog
Number of Modes 1

Modes

Mode Description Units Decimals Num. Values Values
TOUCH-MUX Touch sensors none 0 3

value0: Sensor T1 state [89]

value1: Sensor T2 state [89]

value2: Sensor T3 state [89]

Commands

This sensor does not support commands.

Notes

[89](1, 2, 3)

Values:

Value Description
0 Released
1 Pressed