Sensor Types

There are two different sensor types for the LEGO NXT:
  • Analog
  • Digital

Analog sensors use an Analog to Digital (A/D) Converter in the brick to read the sensor value. Examples include the Light sensor, Gyro sensor, etc.

The A/D converter is a 10-bit device so the raw values range from 0 to 1023. You do not need to know anything about the sensor to read the raw values. The raw value has to be transformed into appropriate units for use by other programs.

Digital sensors use an interface called I2C or I2C (Inter-Integrated Circuit), which is a multi-master low-speed serial bus. Examples include the Ultrasonic (sonar) sensor, IR Seeker, etc.

A digital sensor has a set of registers that can be read from and written to. Each type of sensor has a different register layout, although there are some common standards defined by LEGO. A Digital sensor also has an address because I2C allows multiple devices to be connected to the same serial bus.

Last edited Jan 24, 2010 at 8:12 AM by TrevorTaylor, version 1


No comments yet.