How to Use and Program Lego Mindstorms



          Lego has a programmable robot called Mindstorms EV3, and it is a great introduction to the world of programming and robotics. The EV3 robot is a "brick" to which you can attach motors, wires, sensors, and other pieces, then you can plug it into a computer, write and download a program, and then the EV3 will run the program to the best of it's ability.
          The EV3 can have four different motors running at once as well as four sensors. There are two different types of motors, the large servo motor and the medium servo motor. Both types of motors move by rotating the red part of the motor,

Medium Servo Motor
Large Servo Motor
          The large servo motor (on the right) has more power than the medium motor, and rotates in a different direction. This is the motor that is often used for turning wheels or moving something up and down. Medium servo motors move with less power, and are best used for rotating something around an axle. Motors are plugged into
                                                         the lettered ports at the front of
                                                         the robot.

          There are also four types of sensors. The ultrasonic sensor, the color sensor, the touch sensor, and the Gyro sensor. The sensors are plugged into the numbered ports on the back of the robot. The ultrasonic sensor is used to "see" things. You can use it to sense things in front of it and then you can program your robot to act differently if it sees something. The color sensor does what it says it does. It senses color. You can program it to sense different colors or within a certain color range and it will send a message to the robot when it sees that color. The touch sensor  activates when the red section of it is pushed, pressed, or bumped, it then sends the signal to the robot. The gyro sensor measures how much the robot has turned or tipped. This can be used to sense when the robot has been turned and then correct itself, and it can be used to keep a robot balanced.



Mindstorms EV3 uses blocks to code. The picture to the right shows a blank coding screen. The start block is currently in the coding area. The start block must go at the beginning of every program you want to run. You drag blocks from the bottom part of the screen and they click together into a chain. When this is downloaded onto your robot, the actions will run in their sequence in the chain. The green blocks will move the robot's motors. These are the blocks shown on the screen. The move:
steering block is the most commonly used move block. It will move the two motors attached to ports C and B.Often this will move the robot. When you click on the 0 below the up arrow on the block, a slider will appear and you can control the robot's turning. the gauge to the right of the arrow controls the robot's speed. Negative speed will move the robot backward. To the right of that is the amount of rotations the motor will turn.
          The orange blocks will change the flow of the program, the yellow blocks control input from the sensors, the red blocks deal with more complicated math functions, and the blue blocks are for more advanced control and input.
          Mindstorms EV3 robots are a great entry point to robotics. There are so many things you can do with them, yet their interface is still remarkably intuitive. This is just the tip of the iceberg. There is so much more to EV3, but this is a good place to star.

Comments