Objective
To calibrate a sensor to against a desired minimum and maximum.
Final Program
Calibration block
Figure : Calibration block from Functions Palette
Figure : Calibration Block Context Help. Notice that that there is a terminal to set if your sensor is to calibrate for a maximum or a minimum value.
Procedure
Create a program with the Calibration sensor. For our purpose let us consider calibration for the light sensor. For this case, since all the default values (The values mentioned within parantheses in the context help are the default values) correspond to the light sensor, our final program will look as shown up under Final Program. For the case shown, the calibration program will calibrate the light sensor for the maximum value. That is, when the program is run, when placed on a white tape, say, it will assign the maximum value (100) for that white tape. To set the minimum create a constant and mark it as False. Now, when you place it on the black tape, say, the program will read the light intensity and map it to the minimum (0).