Glossary Item Box
Your LEGO® MINDSTORMS NXT kit comes with three motors and four sensors. All of these devices plug into the NXT Brick and share some common configuration settings.
When using more than one LEGO® NXT Brick, this setting identifies the brick to which this device is attached.
Non-unique devices can be named. If you can plug two of the same device into an NXT brick, the device will have a Name property so that you can distinguish between them. The name may be queried from the service state.
Motor and Sensor Ports
The NXT Brick has three Motor Ports (MotorA, MotorB, and MotorC), and four Sensor Ports (Sensor1-4). All external devices for the NXT plug into one of these ports. Most devices require that you identify which port they have been plugged in to.
Most sensors have the capability of sending you notifications or updates as the value of their sensor changes. This is accomplished by repeatedly contacting the NXT brick and querying the sensor. The polling frequency allows you to configure for each sensor how often this is done.
In most cases, you may leave this value set to 0, which indicates the default polling frequency. However, there may be times when you wish to get sensor reading back from one sensor more often. In this case, you can adjust the polling frequency, which is specified in milliseconds (1/1000 second).
For the motor encoders, touch, sound, and light sensors, it takes about 65 ms to read the sensor. The Ultrasonic Sensor and other third party I2C devices such as the HiTechnic Acceleration Sensor or the MindSensors Compass sensor will take around 200ms. Adjusting the value too low will not damage your robot, but if you configure this polling frequency too low for several sensors, you will flood the NXT brick with requests, and it will be slower to respond to all sensor requests.
When optimizing the polling frequency for one sensor set the polling frequency to 50ms or less. Using a value of 50 or less indicates to the system that you wish to prioritize this device, even if it means slowing down other sensors. It is best to disable polling for any sensors you are not using (by setting them to -1), or to adjust them to 500 or higher so that you get occasional readings but overall the NXT can focus on requests from your primary sensor.
© 2012 Microsoft Corporation. All Rights Reserved.