Published in 2022 by The Rosen Publishing Group, Inc.
29 East 21st Street, New York, NY 10010
Copyright 2022 by The Rosen Publishing Group, Inc.
First Edition
All rights reserved. No part of this book may be reproduced in any form without permission in writing from the publisher, except by a reviewer.
Library of Congress Cataloging-in-Publication Data
Names: Hillman, Emilee, author.
Title: Coding activities for coding robots with LEGO Mindstorms / Emilee Hillman.
Description: First edition. | New York: Rosen Publishing, 2022. |
Series: Code creator | Includes bibliographical references and index.
Identifiers: LCCN 2019015774| ISBN 9781725341081 (library bound) | ISBN 9781725341074 (pbk.)
Subjects: LCSH: RobotsProgrammingJuvenile literature. | RobotsModelsJuvenile literature. | LEGO Mindstorms toys.
Classification: LCC TJ211.2 .H476 2022 | DDC 629.8/925269dc23
LC record available at https://lccn.loc.gov/2019015774
Manufactured in the United States of America
Some of the images in this book illustrate individuals who are models. The depictions do not imply actual situations or events.
CPSIA Compliance Information: Batch #CSRYA22. For further information contact Rosen Publishing, New York, New York at 1-800-237-9932.
Contents
Introduction
At their most basic, robots are machines that move based on instructions that are given by humans. How are these instructions transmitted from a human brain to a robots parts? The answer is no surprise: computer programming. There are a variety of different types of programming languages that can be used to program different types of robots, and robotic technology is becoming more and more commonplace. There are robots of many varieties being manufactured for all ages and purposes.
Robotic arms, such as this, are among the most basicand most usefulkinds of automation. Even moving this single limb requires a lot of coding.
Many robots are being created specifically to teach students to program, preparing them for computer programming at a more advanced level. One of these robots is the LEGO Mindstorms EV3 robotics core kit made by LEGO Education.
LEGO Mindstorms EV3 robotics kits include a variety of building bricks, a programming brick, motors, and sensorsand these components can be used to create a wide range of robots. The LEGO Mindstorms EV3 application is used to program the robot using LEGOs custom-built version of a block programming language. This application is available for Android, iOS, Windows, and macOS. However, the more robust features of the software are only available on the Windows and macOS operating systems.
The LEGO Mindstorms EV3 robotics kits allow you to imagine and create your own robots and customize their movements through programming.
The LEGO Mindstorms EV3 robotics kit comes with instructions for building a basic driving base and directions for slight modifications to add each of the sensors to the driving base, as well as the medium motor to add an arm to the base. The hardware, of course, is just one part of the puzzle, however. The other necessary component is the software application. Instructions for downloading and accessing this software can be found at: https://www.lego.com/en-us/mindstorms/downloads.
After using the LEGO Mindstorms EV3 robotics kits to build a physical robot, the next step is to program that robot using the appropriate software. The version of the application necessary for programming will depend on the number of blocks used to build the robot.
Start the coding process by adding a new program, making sure to give it an appropriate nameMyFirstRobot, for example. The workspace that opens will take up most of the screen and will always have a Start block in the center. Along the bottom of the screen, there are different tabs; each tab contains a specific category of programming blocks. These activities will make use of these various blocks in different ways, and they can be completed using any version of LEGOs programming application.
Take the time to familiarize yourself with the parts in your kit. There are countless different kinds of bricks and additional modifications that could be used to change your robot.
Mindstorms EV3 robots are able to download programming through a wired or Bluetooth connection. It is also possible to do limited programming directly through the brick.
With a robot built and the program constructed, the next step is generally to test the program and the robot together, to make sure they are both working properly. There are two different ways to connect a device to a robot to transfer the program. If it was coded using a computer, it can be transferred by connecting a USB connector cord (which should be included in any LEGO Mindstorms EV3 kit) from the computer to the robot and then downloading the program and telling it to run. This is why it is very important to name the program something recognizable, so that you know which program to run when selecting it on the robot. If the program was coded using a mobile device, the robot can be connected to that mobile device through the use of Bluetooth. After connecting the robot and mobile device together, download and run the appropriate program to test it out.
A mobile application makes it very easy to program your Mindstorms EV3 robot via a Bluetooth connection.
LEGO Mindstorms EV3 robots can be turned on by pressing the button in the center of the main control brick. To turn off the robot, press the gray button directly under the edge of the display screen until asked whether the robot should be powered down. Then, use the quad buttons to toggle to the check and the center button to select the check.
It is possible to name the robot, and this can be done right on the brick itself. In fact, it is also possible to do some limited programming directly through the brick without the need for another device. To name the robot, use the right-side button on the selection of buttons on the front of the brick to scroll over to the settings menu (represented by a wrench image). Then, use the bottom button of the quad to toggle down to Brick Name; use the center button to select that option. Use the buttons to toggle and select each letter in the desired name and then click on the check mark to finally change the name.
Activity 1
Get Moving
This activity will show off two different code blockssteering and tankthat will get the robots motors moving. Each of these blocks will need to be altered by changing the modes, parameters, and values associated with them. See how each of these will change the robots movements to move forward. Which block is most effective for moving straight ahead?
Next page