Schweitzer Fachinformationen
Wenn es um professionelles Wissen geht, ist Schweitzer Fachinformationen wegweisend. Kunden aus Recht und Beratung sowie Unternehmen, öffentliche Verwaltungen und Bibliotheken erhalten komplette Lösungen zum Beschaffen, Verwalten und Nutzen von digitalen und gedruckten Medien.
Introduction xxv
Chapter 1 Introducing LEGO MINDSTORMS EV3 1
Understanding the EV3 Set: It Begins When You Open the Box 2
EV3 Electronic Parts 2
EV3 Software 5
TECHNIC Building Parts 7
The Building Instructions and the Test Board 10
Comparing EV3 and NXT 11
Summary 11
Chapter 2 Building the Auto-Driver: A Starter Vehicle 13
Getting Started with the Auto-Driver 13
What You Can Do with the Auto-Driver 13
Assembling the Auto-Driver 15
Understanding the EV3 Brick Interface 29
Using the Brick Buttons 29
Exploring Four Basic Screens 30
Operating the Auto-Driver 36
Summary 37
Chapter 3 Getting Started with Programming 39
What Is Programming? 39
Communicating with Robots 40
Understanding Programming Languages 40
Previewing the EV3 Software System 41
Launching the EV3 Software 41
What Do You See on the Screen? 42
Understanding the Programming Interface and Graphic Languages 47
Getting Used to the Interface 49
Downloading Programs to a Robot 51
Connecting the EV3 Brick to a Computer 52
Reading the EV3 Brick on the Software 54
Summary 57
Chapter 4 Exploring Action Blocks Part 1: Programming Motors 59
Understanding the Basics of Block Programming 59
Rule 1: Use the Start Block 59
Rule 2: Respect the Program Flow 61
Overview of the Programming Block's Structure 62
Getting to Know the Input Values for the Motors 62
The Off, On, and On for Seconds Modes 63
The On for Degrees and On for Rotations Modes 64
Motor Power Input and the Direction of the Motor 67
Controlling Motors with the Large Motor Block and the Medium Motor Block 68
Working with the Large Motor Block 68
Creating Programs with the Large Motor Block 68
Controlling Two Motors with the Move Steering Block 73
Working with the Move Steering Block 73
Creating Programs with the Move Steering Block 76
Using the Move Tank Block to Control the Power Level of a Motor 82
Working with the Move Tank Block 82
Creating Programs with the Move Tank Block 83
Summary 84
Chapter 5 Exploring Action Blocks Part 2: Using Display, Sound and Brick Status Light Blocks 85
The Display Block 85
Displaying Text: The Text-Pixels and Grid Modes 87
Drawing Shapes: The Line, Circle, Rectangle, and Point Modes 94
Displaying Images: The Image Mode 97
Resetting the Display: The Reset Screen Mode 103
The Sound Block 103
Play File Mode 105
Play Tone Mode 107
Play Note Mode 108
Stop Mode 109
The Brick Status Light Block 110
The On Mode 110
The Off and Reset Modes 110
Summary 111
Chapter 6 Exploring Flow Blocks 113
The Start Block 114
Starting the Program 114
Demonstrating the Line of Code 114
The Wait Block 115
The Compare Mode in the Wait Block 116
The Change Mode in the Wait Block 117
The Time Mode 117
The Brick Buttons Mode 118
The Loop Block 121
The Unlimited, Count, and Time Modes 123
The Brick Button Mode 125
The Loop Interrupt Block 126
The Switch Block 127
The Compare Mode in the Switch Block 128
The Measure Mode in the Switch Block 130
Using a Value from a Data Wire 132
Summary 133
Chapter 7 Building the Spy Rabbit: A Robot That Can React to Its Surroundings 135
Understanding the Spy Rabbit 135
The Spy Rabbit's Personality 136
Assembling the Spy Rabbit 136
Testing the Moving Parts of the Spy Rabbit 158
Summary 159
Chapter 8 Sensing the Environments: Using the Infrared, Touch, and Color Sensors 161
Understanding Sensors 161
Intro to the EV3 Sensors 162
Using the Infrared Sensor and Remote Infrared Beacon 163
Remote Infrared Beacon 163
Remote Mode 164
Beacon Mode 169
Proximity Mode 170
Reading Values from the Port View with the Infrared Sensor 172
Programming with the Infrared Sensor and Remote Infrared 175
Using the Touch Sensor 179
Adding the Touch Sensor to the Spy Rabbit 181
Reading Values from the Port View with the Touch Sensor 182
Programming with the Touch Sensor 183
Using the Color Sensor 187
Color Mode 187
Reflected Light Intensity Mode 189
Ambient Light Intensity Mode 191
Adding the Color Sensor to the Spy Rabbit 192
Reading Values from the Port View with the Color Sensor 195
Programming with the Color Sensor 195
Summary 197
Chapter 9 Using the Timer and the Rotation Sensor 199
Understanding the Timer 199
Working with the Timer in Programming Blocks 201
Programming with the Timer 204
Understanding the Motor Rotation Sensor 206
Using the Motor Rotation Sensor in Programming Blocks 207
Programming with the Motor Rotation Sensor 210
Summary 215
Chapter 10 Building Mr. Turto: A Sea Turtle Robot 217
Understanding Mr. Turto 217
The Structure of Mr. Turto's Body 218
Assembling Mr. Turto 219
Testing Mr. Turto's Movements 247
Summary 248
Chapter 11 Programming with Data Wires and Using My Blocks 249
What Is a Data Wire? 249
How Do Data Wires Work? 250
Getting Started with Data Wire Programming 250
Using Block Input and Output 253
Understanding Data Types and Data Wire Types 254
Sensor Blocks and Data Wires 257
Setting Up the Sensor Blocks 258
Exercise 1: Yay! I Found Something 259
Exercise 2: Can You Hear Me? 261
Exercise 3: Bright Light Makes Mr. Turto Awake 262
Introducing My Blocks 264
Using the My Block Builder 264
Exporting and Importing My Blocks 268
Summary 270
Chapter 12 Using Data Operations Blocks 271
The Variable Block 272
What Is a Variable? 272
Setting Up the Variable Block 273
The Constant Block 278
The Constant Block's Many Modes 279
Constant Blocks in Action 279
The Array Operations Block 280
Append Mode 280
Read and Write at Index Modes 281
Length Mode 282
The Logic Operations Block 283
And Mode 283
Or Mode 284
XOR Mode 284
Not Mode 284
The Math and Round Blocks 286
The Math Block 286
The Round Block 288
The Compare, Range, and Random Blocks 289
The Compare Block 289
The Range Block 290
The Random Block 291
The Text Block 291
Summary 292
Chapter 13 Building the Big Belly Bot: A Robot That Eats and Poops 293
Understanding the Big Belly Bot 293
The Big Belly Bot's Personality 294
The Mechanisms of the Big Belly Bot 295
Assembling the Big Belly Bot 297
Programming the Big Belly Bot 316
Action 1 - Standing Up Straight: Lean Backward to Improve Posture 316
Action 2 - Eating: Check If His Belly Is Full When the Food Comes In. When He Feels Full, Say "Uh-Oh" 317
Action 3 - Pooping: Bend Over, Open the Back End, Poop, and Shake the Body 318
Action 4 - Close the Back End 319
Summary 319
Chapter 14 Design Your Own Robot: How Did Guapo, the Robotic Puppy, Come to Be? 321
Build Guapo, the Robotic Puppy 321
Set a Goal: What Do You Want to Build? 350
Collecting Inspirations for the Goal 350
Defi ning Your Robot's Actions: What Does It Do? 350
Decide on Moving Parts and Sensors 351
Planning by Sketching: The Way to Decide Which Parts Will Move 351
Adding Sensors: Where Sensors Will Be Most Useful 353
Build and Modify: From Core Sections to Decorative Sections 356
Time to Program 358
Summary 360
Appendix Using Bluetooth and WiFi with the EV3 Brick 361
Using Bluetooth with the EV3 Brick 361
Connecting the EV3 Brick to a Computer 362
Using WiFi to Download a Program to the EV3 Brick 364
Using Apple iOS Devices with the EV3 Brick 365
Index 367
Did you get a box that looks like the one shown in Figure 1.1?
Figure 1.1 The LEGO MINDSTORMS EV3 set, item number 31313
If you did, you are ready to use this book. Several versions of the LEGO MINDSTORMS set are available, but throughout this book we use the LEGO MINDSTORMS EV3 set, which has a LEGO item number of 31313. This chapter provides a brief overview of the equipment in the set and what it does.
The EV3 set consists of various components. You may have seen some of the components in other LEGO sets, but even those familiar with the previous version of LEGO MINDSTORMS will find some parts that they have never seen. Before you use your new set, it is important to know what you have. The key components include the following:
By understanding the various components, you will be able to design your robot more efficiently. Let's take a look at these components in more detail.
One of the most important characteristics defining a robot is that it processes commands and generates movements. The electronic components that come with your EV3 set will enable you to build robots that process the commands that you write and generate movements that are defined in those commands.
The EV3 brick, shown in Figure 1.2, acts like the robot's brain. Like the way that our brain tells our body what to do, the EV3 brick instructs a robot how to behave. The difference between our brain and the EV3 brick is that our brain behaves on its own, whereas the EV3 brick only interprets the programs that you write. Note that you will need six AA 1.5V batteries to run the EV3 brick.
Figure 1.2 The EV3 brick
You will program the EV3 motors, shown in Figure 1.3, to create the movements of your robot. Saying that the EV3 brick is the brain of a robot, the motors are like muscles. As our muscles generate all of our body movements, the motors will power all the actions of your robot such as driving, walking, lifting, spinning, and so on.
Figure 1.3 The EV3 Motors: The large motors and the medium motor
As you can see in Figure 1.3, the large and medium motors have quite different appearances. The large motor is bigger than the medium motor, and the body size represents the strength of the motor. Also, the two motors move in different directions: The large motor's movement is parallel with the body of the motor whereas the medium motor's movement is perpendicular with the body of the motor, which allows you to effectively design a robot that can achieve your goal.
Within the EV3 set, you will find a touch sensor, a color sensor, and an infrared sensor (see Figure 1.4). As you build the projects from this book, you will learn to use these sensors to make your robots interactive. In other words, your robot will be able to decide its action based on the inputs from its surroundings. For example, let's say you have a vehicle type robot. With an infrared sensor, it can detect how far an object is in front of it. Based on the data from the sensor, the robot can play a louder sound when it gets closer to the object.
Figure 1.4 The EV3 sensors
The remote infrared beacon, or the IR beacon, is one of the cool new features of EV3 (see Figure 1.5). You can use it as a remote control for your robot, and you can program various commands for each button or combinations of buttons. In addition, you can set your robot to detect where the IR beacon is. Note that you should not use this device with the infrared sensor.
Figure 1.5 The remote infrared beacon
This set contains two types of cables (see Figure 1.6): connector cables and a USB 2.0 cable. Connector cables are for plugging the motors and sensors into the EV3 brick. The USB cable is used to download a program to the EV3 brick from your computer.
Figure 1.6 The connector cables and the USB 2.0 cable
To give your EV3 robot instructions, you must use the EV3 software specifically designed for this set. If you are looking in the box for an installation disc, you will be looking for a while. LEGO offers its free EV3 software only as a download from www.LEGO.com/mindstorms. From the main page, click the Downloads link to display the page shown in Figure 1.7. Then click the Download button.
www.LEGO.com/mindstorms
Figure 1.7 Downloading the EV3 software
Don't worry if you don't have the EV3 software available when you want to test out your robot. There is an app that comes with the brick that allows you to program your robot. The program that you can create with this app will be simpler than with the EV3 software, but it is still very useful! You will see where you can find this app on the brick when we go over the EV3 brick interface in “Building the Auto-Driver: A Starter Vehicle.”
The EV3 software is compatible with both PC and Mac. If you use a Windows operating system, it should be one of the following versions: Windows XP (32-bit); Vista (32-/64-bit), excluding Starter Edition; Windows 7 (32-/64-bit); and Windows 8 desktop mode, excluding Starter Edition. If you use a Mac operation system, it should be one of the following versions: Mac OS X 10.6, 10.7, or 10.8 (Intel only).
The download page contains options for choosing the operating system (Mac OS X and Win32) and language. If you download the installation file for PC, you will see a file with a .exe extension; for Mac, it will be a .dmg file. After the file downloads to your computer, just double-click the file icon and follow the instructions that pop up on your screen.
.exe
.dmg
Other than the electronic parts, the box contains various parts for building robots. Before jumping into building robots, let's overview some of the main building parts that you will use often and their important features.
When building EV3 robots, you will use studless TECHNIC beams (see Figure 1.8). The official name is quite a mouthful, so from here on out we will just refer to the part as a beam. These parts are crucial for building complex, moving robots that would not be possible using standard LEGO bricks.
Figure 1.8 Various studless TECHNIC beams
The set contains many small parts, but the majority of the pieces look like the connector pegs shown in Figure 1.9. Note that they are also called connecter pins.
Figure 1.9 Different types of connector pegs
These components are called connector pegs because they allow multiple parts to snap together. Connector pegs come in different sizes with different features, but one of the important things that you need to know is how to distinguish the following: The connector peg and the connector peg with “friction.” If you look at the regular connector peg, its surface is smooth or “frictionless” (see Figure 1.10), whereas the connector peg with friction has little bumps on the surface.
Figure 1.10 Connector peg with friction versus a frictionless connector peg
If you put a connector peg on a beam, you will notice that the beam can be turned easily. However, if instead you use a connector peg with friction, it will be more difficult to turn the beam because the little bumps on the peg create more resistance.
When you design your robot's movements, the mechanical pieces allow for a more efficient construction (see Figure 1.11). These pieces provide, but are not limited to, mechanical advantages such as switching the direction of gear movement, building a drive train, changing the speed of gear movements, and so on.
The EV3 set comes with many different pieces. Based on my experience, I prefer to have all the parts organized separately as I design a robot. I can thus see what parts I have left at a glance and not lose my thought process by spending time searching for a piece. You can probably use plastic cups or small containers, but I highly recommend that you take as your EV3 organizer an organizer that is normally used for spare parts (see Figure 1.12). This way, you can keep parts organized by size or type and store everything all together. You can find these organizers at any well-stocked hardware store or on the Internet.
Figure 1.11 The EV3 mechanical pieces: spur gears, double bevel gears, worm gear, cam, and so on
Figure 1.12 Organize your EV3 set.
In addition to parts, the EV3 box also contains a booklet with building...
Dateiformat: ePUBKopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet – also für „fließenden” Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.