Constants and Data wires
Posted: 21 Oct 2011, 19:07
I'm fairly new to NXT 2.1. I'm coaching a team with our first event scheduled for Dec. In any case, I'm trying to stay one step ahead of the kids....
My problem is this:
We will be operating our NXT in an environment with a significantly different light setting than where we practice. Our solution, when using the light sensor, is to simply use "Constants" to set the min and max range to sense the white and dark lines on the Field Set Up board.
We have had great success in using constants controlling the "Power" of the "Move" blocks in association with the ultra sonic sensor.
However, we have difficultly with the light sensor set up. We have a logic controlled loop where we have inside, a constant block, a light sensor block and a timer; in that order. A wire is connected from the constant block on the "Value" port to the "Trigger Point" port on the light sensor in our desire that the sensor will use that constant to compare the value listed in the "Constant" verses what defaults into the window on the the light sensor. Then, a green logical YES/NO wire leaves the light sensor block to the loop controlled again by the YES/NO.
It doesn't seem to work. I don't know yet of a way to confirm the data values a sensor is looking at; namely, is my light sensor using the constant value input, or is it using the value in the box listed next to the slider?
Any thoughts anyone?
Ivan
My problem is this:
We will be operating our NXT in an environment with a significantly different light setting than where we practice. Our solution, when using the light sensor, is to simply use "Constants" to set the min and max range to sense the white and dark lines on the Field Set Up board.
We have had great success in using constants controlling the "Power" of the "Move" blocks in association with the ultra sonic sensor.
However, we have difficultly with the light sensor set up. We have a logic controlled loop where we have inside, a constant block, a light sensor block and a timer; in that order. A wire is connected from the constant block on the "Value" port to the "Trigger Point" port on the light sensor in our desire that the sensor will use that constant to compare the value listed in the "Constant" verses what defaults into the window on the the light sensor. Then, a green logical YES/NO wire leaves the light sensor block to the loop controlled again by the YES/NO.
It doesn't seem to work. I don't know yet of a way to confirm the data values a sensor is looking at; namely, is my light sensor using the constant value input, or is it using the value in the box listed next to the slider?
Any thoughts anyone?
Ivan