HiTechnic NXT EOPD Sensor For LEGOÒ MINDSTORMSÒ NXT
Introduction
The EOPD sensor uses light signals to detect the presence of an object or measure the distance to a target. This sensor is not a conventional light sensor and does not respond to external light sources. Instead it generates its own light source and responds only to the reflection of this internal light source. The EOPD automatically cancels background light so no calibration is necessary when moving from bright light conditions to low light.
The EOPD has two sensitivity settings, standard range and long range. In long range mode, the EOPD is about 4 times more sensitive than in standard range.
Programming
Mindstorms NXT-G
The EOPD Sensor can be programmed using LEGO Mindstorms NXT Software EOPD Sensor Block that can be downloaded from the HiTechnic Downloads page.
EOPD Sensor Block
This plug wires the NXT port number your EOPD is connected to.
This plug wires the value to compare against for the trigger.
This plug wires the logic used in the trigger comparison.
This plug wires the Long Range selection.
This plug wires the result of the trigger comparison.
This plug wires the processed value from the sensor.
This plug wires the raw value from the sensor.
EOPD Front Panel
Choose the port your EOPD is plugged into. By default, the block will be set to port 1 for the EOPD. You can change this selection if you want.
Use the slider to set the trigger value or type a value directly into the input box. Select the radio button to the right of the slider if you want the block to be triggered by levels higher than the trigger value; select the left radio button to trigger the block with levels lower than the trigger value. You can also use the pull-down menu to set the “true” portion of the slider.
If you check the “Long Range” checkbox, the EOPD sensor will adjust the sensitivity to detect objects over a longer distance.
Other Programming Environments
RobotC
All features of the EOPD Sensor can be accessed using RobotC. For more information go to www.RobotC.net
NXC
Not eXactly C (NXC) a version of the C programming language, can be used to access all the features of the EOPD sensor.For more information go to http://bricxcc.sourceforge.net/nbc/.