Join David Gassner for an in-depth discussion in this video Building and controlling a real robot: LEGO Mindstorms, part of Foundations of Programming: Programming for Kids.
As we've seen throughout this course, kids love learning how to program when it's fun. And what's more fun than robots? LEGO Minestorms is a product line that includes conventional LEGO's, those plastic pieces that you snap together to make cool stuff. With programmable computers, with sensors for input and electric motors that make parts of the robot move. LEGO Mindstorms robots might look like toys but they have a serious lineage. They were co-developed by the LEGO Group and the MIT Media Lab.
Professors at the lab developed the idea of the programmable brick that's at the center of a Mindstorms robot. And LEGO has been responsible for productization and marketing. The parts and computers for Mindstorms robots come in educational and consumer targeted kits. But both versions let you build a variety of robots. You get a few hundred LEGO pieces and the computerized components. Detailed assembly instructions and the software to program the robots are available on the Mindstorms website at www.lego.com/mindstorms.
This is the flagship robot that's displayed on the Mindstorms box. Its name is EV3RSTORM with a three in the middle for the version of the kit, EV3. Building EV3RSTORM uses most of what comes in the consumer version of the kit. Part of the fun of working with the LEGO robots is putting them together. This robot took a few days to assemble, and would have taken more time if I hadn't had the help of some neighborhood kids who kept me on-task. The centerpiece of the Mindstorms robot kit is the programmable brick.
On this robot, the brick is the torso. The brick has four input ports on top and four output ports on the bottom. It also has a standard USB port and an SD memory card slot for file sharing on the side. Another port for accepting a USB connection to a Mac or PC. A programmable display on the front. And speakers for playing sounds. The other programmable components are sensors and motors. This robot has a touch sensor on one shoulder. A color sensor on the other, and infrared sensors serving as its eyes.
It has three motors, one to drive each leg, or tractor, and one that serves as its left arm, to launch little red pellets. As you assemble the robot, you hook up the sensors and motors to the programmable brick with the included cables. Then, after initial configuration through a USB cable, you can detach the cable and do all the rest of your programming and testing wirelessly, using either Wi-Fi or Bluetooth connections. After assembling the robot, you can immediately control it with a mobile app named Robot Commander that's available for both iOS and Android.
I'm running it on a Nexus 7, but you can run it on any Android device or on an iPhone or iPad. Like the programming environment, the app is free. I'm using the remote app to control the EV3RSTORM robot. But you can also control other designs by LEGO, or your own custom robot designs. I'm going to connect to the robot by pressing the Connection button. I'm using a pre-defined Bluetooth connection. When I connect the robot will react. The remote app has buttons to move the robot forward and backward and turn in both directions.
It also has some sinister looking commands labeled Shoot, Shoot Up, and Attack. But all they do is turn the motor on the left arm. So you could translate that to whatever action you want in a custom design. Let's play with it for a bit. I'll press the Go button to make the robot move forward. And then the Back button to make it move backward. I'll make it move right. And left. And when I press the Escape button, the tractors will move in an alternating fashion. You can even control the robot with voice activation.
Just hold down the Microphone button and say the commands, go. >> Okie dokie. >> Stop. Beyond just having some fun with the robot, using the remote app can help you understand how the robot is put together. When you push the Go, Back, Skate and Direction buttons, you're activating the motors on the robot's legs. The Shooting buttons activate the motor on the robot's left arm. And since you built the robot, you can track the cables that connect the brick to the motors, and you'll have a better understanding of which ports are being activated by the software.
Then, once the kids have exhausted the capabilities of the remote app, they'll be ready for the next step. Programming their own custom routines to make the robot do what they want it to do.
- Understanding your child's learning style
- Graphical programming on iPads and computers
- Making things move
- Learning about algorithms
- Programming animations, apps, and games
- Programming virtual and real robots
- Programming hardware: Arduino and Raspberry Pi