Concept Explanation: Sensor Configuration

Printer-friendly version


If motors are the output of our programs, then sensors are the input. Sensors give the NXT the ability to become aware of the world around it. We can use this awareness to grant the NXT the intelligence to navigate a dynamically changing world.

As with motors, before we can use a sensor, we must first configure it. This is done using the same tool we used to setup the motors.


In this case, we attached the light sensor to port 3 on the NXT. The type of sensors provided with the NXT kit are as follows:


Images From

As with the motor configuration, the utility will create a #pragma command at the start of your program. Once configured, your NXT will be granted the ability to access the data generated by the sensors.