The Constant block lets you enter a value that you can use in several different places in your program. If you change the value of the constant, all places where you use the constant will get the updated value.
Using a Constant
Mode Selector Block Text Field Output
Use the Mode Selector to select the type for the constant. See Data Types for more information on the different Types.
Modes
Text - Numeric - Boolean - NumericArray - BooleanArray
Enter the value for the constant into the Block Text Field at the top of the block. This value is output to Value.
Example
This program uses a Constant block to provide the Power input for three different Move Steering blocks. By changing the single value in the Constant block, all three Move Steering blocks will get the new updated Power level.
Inputs and Outputs
The input of the Constant block is entered in the Block Text Field. The output is the constant value in the block. To use the output, use a Data Wire to connect it to another Programming Block.