O'Reilly logo

Building Smart LEGO MINDSTORMS EV3 Robots by Kyle Markland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Program

To start, drag out a math block (set to subtract) and a variable block. Both are found under the red data operations tab of the programming palate:

A variable is a placeholder for a value. They have two operations: write, which changes the value stored in the variable, and read, which retrieves the stored value. This means that variables are a convenient way to save a value in one part of a program to use it in another part of the code. In the EV3 software, variables can store three types of data: numeric, logic, and text.

A variable must be defined before we can use it in the program. The first step is to choose the data type. By ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required