The document discusses variable blocks and math blocks in programming the NXT robot. Variable blocks are used to store values in the NXT's memory by defining a variable name and data type. Math blocks perform arithmetic operations like addition and subtraction by selecting the operation and input values from variables or wires. Configuring the blocks involves selecting the variable to read or write data to and the operation for math blocks.
The document discusses variable blocks and math blocks in programming the NXT robot. Variable blocks are used to store values in the NXT's memory by defining a variable name and data type. Math blocks perform arithmetic operations like addition and subtraction by selecting the operation and input values from variables or wires. Configuring the blocks involves selecting the variable to read or write data to and the operation for math blocks.
The document discusses variable blocks and math blocks in programming the NXT robot. Variable blocks are used to store values in the NXT's memory by defining a variable name and data type. Math blocks perform arithmetic operations like addition and subtraction by selecting the operation and input values from variables or wires. Configuring the blocks involves selecting the variable to read or write data to and the operation for math blocks.
The document discusses variable blocks and math blocks in programming the NXT robot. Variable blocks are used to store values in the NXT's memory by defining a variable name and data type. Math blocks perform arithmetic operations like addition and subtraction by selecting the operation and input values from variables or wires. Configuring the blocks involves selecting the variable to read or write data to and the operation for math blocks.
Download as PPTX, PDF, TXT or read online from Scribd
Download as pptx, pdf, or txt
You are on page 1of 12
Math and Variable Block
Variable Block Variable Block
❖ A block used to store a
value in the NXTs built-in memory Creating a Variable
Choose the Define Variable
command in the Edit menu of the software. Creating a Variable In the dialog window, give your new variable a short, easy-to-understand name and set the type of data that the variable will hold. Configuring The Variable Block 1. In the list, select the variable that you want to pass or write a data. Configuring The Variable Block 2. Choose to either read the variable’s current value or write a new data to the variable. Configuring The Variable Block 3. Used if you want to give your variable block a starting value. Math Block Math Block ❖ This block performs simple arithmetic operations like addition, subtraction, multiplication, and division. Configuring The Math Block 1. Input values can be typed in or supplied dynamically by data wires. Configuring The Math Block 2. The pull-down menu will let you choose from six arithmetic operations you can perform.