Tip:
Tip:
The number shows which of your NXT’s ports are connected to the Vernier sensor. You can change this number in the configuration panel if you need to.
This
icon indicates at what level the trigger point is set. The more of the
semicircle filled in, the higher the trigger point. When the Vernier
Sensor
block is used to zero or calibrate a sensor, the
icon will
appear here. When the Vernier Sensor block is used to reset the
calibraton of a sensor, the Reset icon,
, will appear here.
The block’s data hub will open automatically when the block is placed in the work area. Click on the data hub and pull down to show the other connectors. (See the Data Hub section below for more information.)
Choose the port where your Vernier adapter and sensor are plugged in. By default, the block will be set to port 1 for a Vernier sensor. You can change this selection if you need to.
Choose the Vernier sensor you are using from the pull-down list.
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 sensor levels higher than the trigger value; select the left radio button to trigger the block with sensor levels lower than the trigger value. You can also use the pull-down menu to set the “true” portion of the slider.
The meter displays the current sensor reading. The range matches the range of the sensor.
The feedback box displays the current sensor reading.
The Action is normally set for Read Sensor, but it can be set for Zero/Calibrate Sensor, or Reset. See the Zero/Reset section of this help below for more information.
You can control the Vernier Sensor block dynamically by connecting data wires (to or from other blocks’ data hubs) to the Vernier Sensor block’s data hub.
Open a block’s data hub by clicking the tab at the lower left edge of the block after it has been placed on the work area.
Data wires carrying input information to a block are connected to the plugs on the left side of its data hub. Data wires carrying output information are connected to the plugs on the right side.
[A] Input plug
[B] Output plug
[C] Number data wire (yellow)
[D] Logic data wire (green)
[E] Text data wire (orange)
[F] Broken data wire (gray)
If an input plug has a corresponding output plug (see A above), the input data will pass through from the input plug to the output plug without being changed. In this case, you can only use the output plug if the input plug is connected to an input data wire; connecting an output data wire to such an output plug without a connected input data wire will cause the output data wire to be “broken” (and colored gray).
Each data wire carries a specific type of data between blocks. For example, if a data wire is dragged from a logic plug on a block’s data hub, it can only be connected to a logic plug on another block’s data hub. The chart below shows what kind of data each plug can accept or send out.
Data wires are identified with specific colors: wires carrying number data are colored yellow, wires carrying logic data are colored green, and wires carrying text data are colored orange.
If you try to connect a data wire to a plug of the wrong data type, the data wire will be broken (and colored gray). You will not be able to download your program if a data wire is broken.
If you click a broken wire you can read why it is broken in the small help window in the lower right corner of the work area.
If an input data wire transmits a value outside the possible range of the plug it is connected to, the block will either ignore the value or change it to a value within its range. For plugs that allow just a few input values (example: just 0, 1, or 2), the plug will ignore the input if a value arrives outside its range.
For plugs that accept larger input ranges (example: 0 – 100), the plug will force any input outside its range to fit.
This chart shows the different characteristics of the plugs on the Vernier Sensor block’s data hub:
Plug | Data Type | Possible Range | What the Values Mean | |
![]() |
Port | Number | 1 - 4 | 1 = Port 1, 2 = Port 2, 3 = Port 3, 4 = Port 4 |
![]() |
Action |
3
options
|
Read Sensor, Zero/Calibrate, or Reset | |
![]() |
Trigger Point | Number |
Sensor
Min - Max |
Value to compare against |
![]() |
Greater / Less | Logic | True/False | Logic used in comparison
to the Trigger Point. True = Greater, False = Less |
![]() |
Yes / No | Logic | True/False | Result of comparison |
![]() |
Raw Value | Number | 0 to 1023 | The count from the A-to-D converter in the NXT |
![]() |
Sensor Reading | Number | Sensor Min - Max |
Sensor reading numeric value. |
![]() |
Sensor Reading (Text) | Text | Text | Reports the reading of the sensor with units as a text string so that it can be quickly displayed on the NXT screen. |
Tip:
Displaying Sensor Readings on the NXT Screen
Using the Action control, you can set the Vernier Sensor Block to Zero/Calibrate. This provides a way for you to adjust the calibration of the sensor you are using. For example, if an accelerometer is not reading zero acceleration when it is at rest, you can adjust it so it correctly reads zero. Build a program with Vernier Sensor Block at the beginning. Choose the accelerometer as the sensor to use for this block and choose Zero/Calibrate as the Action. When you download and run the NXT program, have the accelerometer oriented as you want to use it and at rest. When this block of the program executes the reading will be adjusted so that the acceleration is defined as 0. This adjustment will be used in all other blocks in the program. This zero adjustment is saved in the VernierSensorXX.cal file on the NXT, where XX is the sensor number. This file will be used until you delete it from the NXT. You can do this by using the NXT Controller in the MINDSTORMS computer program, or by using the Vernier Sensor Block set for Reset action, and set for the same Vernier sensor.
When you use a Vernier Sensor Block with the Action control set to Reset, you can remove one of these .cal files and restore the default calibration. Build a program with Vernier Sensor Block at the beginning. Choose Reset for the Action and choose the appropriate sensor from the Sensor pull-down list. When you download and run this program and this block executes, the calibration file for that type of Vernier sensor will be deleted from the NXT.Since there is no such thing as 0 pH, we have an alternative way to adjust the calibration of the Vernier pH sensor. This calibration adjustment depends on the use of a pH 7 buffer. This is a solution available in most science classrooms that is made to have a pH of exactly 7.0. Build a program with a Vernier Sensor Block, set for pH, at the beginning. Choose Zero/Calibrate on this block. When you download and run the NXT program, have the pH sensor in the pH 7 buffer. When this block of the program executes the reading will be adjusted so that the pH reads exactly 7.0.