Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore _LM-EV3_31313_

_LM-EV3_31313_

Published by laraclass, 2015-02-11 02:28:57

Description: _LM-EV3_31313_

Search

Read the Text Version

Figure B-2. Adding a block to a programreplacing a blockYou can replace a block in your program with another one by selecting it (place it at thecenter of your screen with the Left and Right buttons) and pressing the Up button. Then,choose the new block with the Center button, or cancel the change with the Backbutton.deleting a blockYou can delete a block from your program by selecting it, pressing the Up button, andselecting the trash bin, as shown in Figure B-3.configuring a block’s settingEach block has one configurable setting. To change it, select the block you want tochange and press the Center button, as shown in Figure B-4. Then, use the Up andDown buttons to change the setting. Confirm with the Center button or cancel with theBack button.

Figure B-3. Deleting a block from a program

Figure B-4. Changing the setting on a block. In this example, you set the brick status light color to red (R) instead of orange (O).running a programNow create the OnBrickStatus program (see Figure B-5). Place two Brick Status Lightblocks and two Wait blocks in the loop. Then, configure the program to change the lightcolor to red, wait 2 seconds, change the light color to green, and wait 2 more seconds.Finally, change the setting of the Loop block so that it keeps repeating the blocks withinit.Now run the program by selecting the left part of the Loop block and pressing theCenter button, as shown in Figure B-5. The brick status light should blink red for 2seconds, blink green for 2 seconds, and continue alternating back and forth. You canabort the running program by pressing the Back button.

Figure B-5. The OnBrickStatus program changes the light color every 2 seconds. The full program is shown here, but you’ll see only a subsection of it on the EV3 screen. Use the Left and Right buttons to verify that your program matches the figure.saving and opening a programSelect the Save symbol to save your current program, as shown in Figure B-1. On thescreen, you’ll see a keyboard that you can control using the EV3 buttons. Selectbackspace ( ) to remove the current name, enter OnBrickStatus by choosing letterswith the Center button, and then select the check mark.To open and edit a previously saved On Brick program, select the open symbol andchoose a program from the list that appears. If you just want to run your saved program,you can find it in the BrkProg_SAVE folder on the File Navigation tab of the EV3 brick.If you close the Brick Program app using the Back button, you’ll be prompted to save theprogram. Choose X to close without saving, or select the check mark to choose a nameand save it. NOTE You’ll need to enter the name each time you save the program, so choose a short and simple name if you expect to modify your program often.using the on brick programming blocksTable B-1 shows which blocks are available for your On Brick programs, alongside theequivalent programming block in the EV3 software. You can choose from a selection ofAction blocks or a Wait block in one of several modes. Use the page numbers in thetable to find more information about each block or sensor mode.The Brick Program app allows you to change just one setting on each block. Theequivalent setting on the block in the EV3 software is marked in blue. Other settings,such as the sensor or motor ports, can’t be changed. For example, if you want to use theTouch Sensor in an On Brick program, it must be plugged into input port 1.The numeric settings on the Display and Sound blocks correspond to different image andsound files, respectively. You can find which file corresponds to each number in thebrick program app assets list in Figure 5-12 of the EV3 user guide. (Click User Guidein the EV3 Software Lobby, as shown in Figure 3-2.)You can use these blocks to create programs similar to those you made throughoutChapter 4–Chapter 6. For example, you can create a program that makes a Large Motorturn for 1 second each time you press the Touch Sensor. Attach the Touch Sensor toinput port 1, attach a Large Motor to output port D, and create and run the OnBrickTouchprogram (see Figure B-6).Note that this program makes the motor move for 1 second by switching the motor on,waiting 1 second, and then setting the motor speed to 0.importing on brick programsYou can import a saved On Brick program into an EV3 software project by connecting

the EV3 brick to the computer and clicking Tools ▸ Import Brick Program, as shownin Figure B-7. Choose the program on the dialog that appears, and click Import. Theprogram should now appear on its own tab inside your current project.Table B-1. the blocks available in the brick program app and the equivalent blocks in the EV3 software



Figure B-6. The OnBrickTouch program makes the Large Motor on port D move for 1 second each time you press the Touch Sensor. Figure B-7. Importing an On Brick program into the EV3 softwareOnce your program is imported into the EV3 software, you can edit it as you would anyother EV3 program. As you can see, the blocks of the OnBrickTouch program haveturned into the equivalent set of blocks in the EV3 computer software, according toTable B-1. When you run this program, it should behave just like the program you madeon the EV3 brick.Once imported into the EV3 software, a copy of the original On Brick program remainson the EV3 brick, but if you modify the program in the computer software, you can’tturn it back into an On Brick program. NOTE There is one exception to Table B-1: In an On Brick program, a Wait block in Motor Rotations – Degrees mode always resets the Rotation Sensor to 0 before it runs, but once the program is imported, it will no longer do this. You can reset the Rotation Sensor in your program if necessary with an additional block (see Figure 9-4).summaryYou can create basic programs on the EV3 brick without a computer using the BrickProgram app. Doing so can be a useful way to test a robot when you’re away from acomputer. On Brick programs always consist of a series of Action blocks and Waitblocks placed in one Loop block. Once you’ve imported an On Brick program into theEV3 software, you can edit and run it as you would a normal EV3 program.

Appendix C.The LEGO MINDSTORMS EV3 Discovery Book is set in Chevin. The book was printedand bound by Lake Book Manufacturing in Melrose Park, Illinois. The paper is 70#Orion Satin.

Index A NOTE ON THE DIGITAL INDEX A link in an index entry is displayed as the section title in which that entry appears. Because some sections have multiple index markers, it is not unusual for an entry to have several links to the same section. Clicking on any link will take you directly to the place in the text in which the marker appears.Symbols% (modulo operator), my block #2: return* (multiplication operator), my block #2: return/ (division operator), my block #2: return12T gear, the grabber mechanism24T gear, the grabber mechanism36T gear, the grabber mechanismAaccelerating a motor, data wire value rangeAction blocks, creating a basic programAdvanced blocks, creating a basic programAdvanced mode, Math block, using advanced modeAmbient Light Intensity mode, using the color sensor, ambient light intensity modeAnd mode, Logic Operations block, the logic operations blockangled beams, using beams to reinforce structures extending gears along, gear trains around a cornerANTY robot, ANTY: the robotic ant avoiding obstacles, making ANTY walk building, building ANTY finding food, avoiding obstacles parts list, building ANTY

placing motors in opposite positions, making ANTY walk sensing color in environment, avoiding obstacles walking mechanism, understanding the walking mechanismAvailable Bricks tab, troubleshooting the EV3axles, building with beams, axles, connector blocks, and motors determining length of, building your first robot extending using connector blocks, using connector blocks perpendicular, connecting perpendicular axles preventing from falling out, using the LEGO unit grid preventing from twisting, preventing axles from twisting using with cross holes, using the LEGO unit grid using with sensors, building with sensorsBbacklash from gears, friction and backlashbackward, driving, the move steering block in action, rotations, seconds, or degreesball magazine, building with sensorsball shooter, building with sensorsbatteries EV3 rechargeable, the EV3 brick for remote control, the EV3 brick replacing, turning the EV3 on and offbeacon (see remote control)Beacon Heading mode, beacon proximity mode Beacon Proximity and, compare mode and beacon values measurements for, my block #4: searchBeacon Proximity mode, beacon proximity mode

beams, building with beams, axles, connector blocks, and motors adding attachment points to Large Motor, preventing axles from twisting angled, using beams to reinforce structures bracing gears with, using worm gears connecting at right angle, using connector blocks, securing parallel beams connecting parallel, using connector blocks, securing parallel beams connecting to Large Motor, connecting beams to the motor shaft determining length of, building your first robot extending, building with beams, axles, connector blocks, and motors measuring, building with beams, axles, connector blocks, and motors reinforcing structures, using beams to reinforce structures securing parallel, using connector blocks using with sensors, building with sensorsbevel gears, friction and backlash, gear trains around a cornerblocks (programming), working with programming blocks: action blocks, using dataoperations blocks and my blocks with data wires (see also individual blocks) arranging, 3. programming canvas deleting, creating a basic program duplicating, duplicating one or more blocks EV3 brick buttons and, using the brick buttons and rotation sensors help for, duplicating one or more blocks modes and settings for, working with programming blocks: action blocks, understanding modes and settings multitasking multiple Start blocks, managing my blocks in projects resource conflicts, avoiding resource conflicts

splitting Sequence Wire, managing my blocks in projects My Blocks (see My Blocks) negative power value, rotations, seconds, or degrees On Brick programs (see On Brick programs) placing in program, creating a basic program running selected, running selected blocks troubleshooting errors, troubleshooting programs, the EV3 brick, and wireless connections types of, creating a basic program viewing currently running, troubleshooting a running programBluetooth connecting with, finding a Bluetooth dongle dongles, finding a Bluetooth dongle downloading programs, avoiding data loss using a microSD card Settings tab, turning the EV3 on and off vs. Wi-Fi, connecting to the EV3 with Bluetoothbonus models, help documentationbracing gears with beams, using worm gearsBrake at End setting, rotations, seconds, or degrees, my block #2: leftbrick (see EV3 brick)Brick Apps tab, turning the EV3 on and offBrick Buttons block, using sensor blocksBrick Buttons sensor, using the brick buttons and rotation sensorsBrick Status Light block, the display block in action, troubleshooting a running programbumper using Touch Sensor, what are sensors?bushes, building with beams, axles, connector blocks, and motors attaching too tightly, gearing essentials

preventing axles from falling out, using the LEGO unit gridbuttons, EV3 brick, output ports, input ports, and cables programming with, using the brick buttons and rotation sensorsCcables, output ports, input ports, and cablescam, using half LEGO unitsChange mode, sensors and the wait block, avoiding obstacles with the touch sensor,understanding compare, change, and measure modeClear Screen setting, Display block, understanding the SoundCheck programclosing programs, running selected blocksColor mode, using the color sensor, color modecolor reference chart, color modeColor Sensor, what are sensors?, using the color sensor Ambient Light Intensity mode, using the color sensor, ambient light intensity mode attaching to EXPLOR3R, using the color sensor Color mode, using the color sensor, color mode color reference chart, color mode detecting handshake, walking until one of two sensors is triggered following line, following a line following line, smoothly, following a line more smoothly Reflected Light Intensity mode, using the color sensor, the switch block in measure mode following line smoothly, following a line more smoothly threshold value, setting the threshold value sensing color in environment absence of color, avoiding obstacles reacting to with ANTY, green: safety

staying inside colored line, color mode test track for, color modeColor Sensor block, using sensor blocksColor setting, Display block, clear screenComment block, missing variable definitionscomments tool for, renaming projects and programs usefulness for troubleshooting, missing variable definitionsCompare block, the compare block, my block #3: onsyncCompare mode, understanding compare, change, and measure mode Change mode vs., sensors and the wait block Touch Sensor, compare mode and beacon valuescompilation errors missing My Block, troubleshooting programs, the EV3 brick, and wireless connections missing variable definition, missing variable definitions programming block errors, troubleshooting programs, the EV3 brick, and wireless connectionscompound gear ratio, creating longer gear trainsconnections Bluetooth, finding a Bluetooth dongle troubleshooting, troubleshooting the EV3connector blocks, building with beams, axles, connector blocks, and motors connecting beams at right angle, using connector blocks, securing parallel beams connecting parallel beams, using connector blocks extending axles, using connector blocksConstant block, using constants and variables

Variable block vs., using the variable blockContent Editor, help documentationContext Help, help documentationcopying programming blocks, duplicating one or more blocksCount value, changing and incrementing variable valuescross hole, using the LEGO unit grid, connecting beams to the motor shaftCurrent Power mode, resetting the motor position, rotational speedcurved turns, making accurate turnsDData Operations blocks, creating a basic program, using data operations blocks and myblocks with data wires Compare block, the compare block, my block #3: onsync Logic Operations block, the logic operations block modes for, the logic operations block Not mode, logic operations Math block (see Math block) Random block, the random block Range block, logic operations Round block, the round block Text block, the round blockdata wires, getting started with data wires blocks inside Switch blocks, connecting data wires to blocks inside switch blocks deleting, deleting a data wire displaying value on the EV3 screen, converting logic values to numeric values Logic, repeating blocks with data wires Logic array, numeric array and logic array Loop block and, data wire value range

Math block and, practicing with the math block Numeric, repeating blocks with data wires Numeric array, numeric array and logic array placement in programs, deleting a data wire repeating blocks with, repeating blocks with data wires seeing values from, working with data wires Switch block and, ending a loop in logic mode Text, repeating blocks with data wires type conversion, numeric array and logic array using multiple, deleting a data wire using with My Blocks, the text block value range for, compare mode and beacon values Wait block and, data wire value rangedecompiling programs, managing the EV3’s memorydecorating robots, building with sensorsdecreasing speed, calculating the gear ratio for two gears, creating longer gear trainsDegrees mode, understanding modes and settingsdeleting data wires, deleting a data wireDemo program, selecting and running programsDisconnect button, troubleshooting the EV3Display block, understanding the SoundCheck program Clear Screen setting, understanding the SoundCheck program Color setting, clear screen Display field, understanding the SoundCheck program position on screen, clear screen Radius setting, clear screen

Shapes mode, understanding the SoundCheck program signaling progress using, troubleshooting a running program sub modes, understanding the SoundCheck program Text mode, clear screen Wired setting, converting logic values to numeric valuesdivision operator (/), my block #2: returndouble-bevel gears, friction and backlash, gear trains around a cornerDownload and Run button, creating and modifying programsdownloading color reference chart, color mode EV3 programming software, the mission pad example programs, estimating difficulty and time LEGO unit grid, using angled beams line-following tracks, the switch block in measure modedriving acceleration, making accurate turns backward, the move steering block in action, rotations, seconds, or degreesDuration setting, Sound block, play type, breaking a loop from the outsideEequal to comparisons, the compare blockequality, checking, the compare blockEquation setting, using advanced modeEV3 brick, preparing your EV3 set, the EV3 brick (see also On Brick programs) batteries for, the EV3 brick buttons on, output ports, input ports, and cables

programming with, using the brick buttons and rotation sensors downloading programs to, creating and modifying programs, 3. programming canvas using Bluetooth, avoiding data loss using a microSD card using Wi-Fi, connecting to the EV3 with Bluetooth finding programs on, renaming projects and programs memory management, avoiding data loss using a microSD card microSD card, avoiding data loss using a microSD card restarting, managing the EV3’s memory running programs, selecting and running programs status light on, turning the EV3 on and off, the display block in action troubleshooting (see troubleshooting: EV3 brick) turning on/off, turning the EV3 on and off updating firmware, managing the EV3’s memoryEV3 programming software, working with programming blocks: action blocks (see also blocks (programming); programs; projects) Comment tool, renaming projects and programs Content Editor, help documentation controlling robot, the mission pad downloading, the mission pad downloading programs to the EV3, creating and modifying programs, 3. programming canvas Hardware Page, 3. programming canvas help for blocks, duplicating one or more blocks installing, downloading and installing the EV3 programming software launching, creating and modifying programs Pan tool, renaming projects and programs placing blocks in, creating a basic program

Programming Canvas, creating a basic program Programming Palette, creating a basic program projects vs. programs, running selected blocks running programs manually, 3. programming canvas running selected blocks, running selected blocks Select tool, renaming projects and programs Start block, creating a basic program toolbar in, renaming projects and programs updating, downloading and installing the EV3 programming software Zoom tool, renaming projects and programsEV3 rechargeable battery, the EV3 brickEV3RSTORM robot, help documentationEXPLOR3R robot, building your first robot, building your first robot attaching Color Sensor, using the color sensor avoiding obstacles, sensors and the wait block, avoiding obstacles building, building the EXPLOR3R connecting cables, output ports, input ports, and cables creating bumper using Touch Sensor, what are sensors? following line smoothly, following a line more smoothly following line using Color Sensor, following a line material list for, building the EXPLOR3R regulated vs. unregulated speed, understanding speed regulation test track for, color mode using multiple sensors, avoiding obstaclesexternal devices, output ports, input ports, and cablesF

File Navigation tab, turning the EV3 on and off, renaming projects and programsfirmware, updating, creating and modifying programs, managing the EV3’s memoryFlat View vs. Tabbed View, using flat view and tabbed viewflexible structures, using half LEGO unitsFlow blocks, creating a basic programFormula EV3 Race Car robot, Formula EV3: a racing robot building, building the Formula EV3 Race Car moving autonomously, avoiding obstacles, racing autonomously parts list, building the Formula EV3 Race Car remote control program for, testing the my blocks steering, driving and steering centering, my block #2: left left and right, my block #2: left resetting, driving and steering testing, testing the my blocksframes, building with beams, axles, connector blocks, and motors, building with beams,axles, connector blocks, and motorsfriction from gears, friction and backlashfriction pins, building your first robot, building with beams, axles, connector blocks, andmotorsGgears, building with beams, axles, connector blocks, and motors 12T gear, the grabber mechanism 24T gear, the grabber mechanism 36T gear, the grabber mechanism bevel, friction and backlash, gear trains around a corner bracing with beams, using worm gears

calculating gear ratio, calculating the gear ratio for two gearscalculating output speed, calculating the gear ratio for two gearscompound gear ratio, creating longer gear trainsconnecting to motors, further explorationdouble-bevel, friction and backlash, gear trains around a cornerextending along angled beam, gear trains around a cornerfriction and backlash, friction and backlashhalf units and, working with the unit gridimproper combinations of, gear trains around a cornerincluded in set, friction and backlashincreasing and decreasing speed, calculating the gear ratio for two gearsknob wheel, friction and backlash, connecting perpendicular axlesperpendicular axles, connecting perpendicular axlesperpendicular connections, gear trains around a cornerpreventing axles from twisting, preventing axles from twistingradius of, working with the unit gridratio calculator, working with the unit gridreversing rotation direction, preventing axles from twistingspur gear, friction and backlashteeth on, gearing essentialstorque, decreasing and increasing rotational speed decreasing, what is torque? increasing, what is torque?, creating longer gear trainstrains of, building with gears, what is torque?unit grid and, working with the unit griduses for, building with gears

worm gear, friction and backlash, connecting perpendicular axlesgrabber mechanism for SNATCH3R, the SNATCH3R: the autonomous robotic armgreater than comparisons, the compare blockHH-frame, building with beams, axles, connector blocks, and motorshalf units, using half LEGO units gears and, working with the unit gridhandshake, detecting, walking until one of two sensors is triggeredHardware Page, 3. programming canvas, viewing sensor values, troubleshooting the EV3help for programming blocks, duplicating one or more blockshinges using nonfriction pins, using half LEGO unitsIidler gear, creating longer gear trainsincrementing variables, changing and incrementing variable valuesinfrared remote control (see remote control)Infrared Sensor, what are sensors? avoiding obstacles with, avoiding obstacles, racing autonomously Beacon Heading mode, beacon proximity mode Beacon Proximity mode, beacon proximity mode capabilities of, using the infrared sensor combining sensor modes, combining sensor operation modes Proximity mode, using the infrared sensor avoiding obstacles, avoiding obstacles combining with other sensors, avoiding obstacles Remote mode, remote mode using remote control with, remote mode

Infrared Sensor block, using sensor blocksinput gear, creating longer gear trainsinput ports, output ports, input ports, and cablesinstalling EV3 programming software, downloading and installing the EV3programming softwareIR Control app, selecting and running programsIR remote control (see remote control)Kknob wheel gear, friction and backlash, connecting perpendicular axlesLLarge Motor adding attachment points, preventing axles from twisting calculating rotational speed, rotational speed connecting beams to, connecting beams to the motor shaft connecting gears to, further exploration connecting two using frame, building with motors and sensors connecting wheels to, building with motors and sensors, connecting beams to the motor shaft geometry of, connecting beams to the motor shaft maximum torque, what is torque? regulated speed and power consumption, understanding speed regulation rotational speed, resetting the motor positionLarge Motor block, the on and off modes in move blocksLAVA R3X robot, LAVA R3X: the humanoid that walks and talks avoiding obstacles, controlling the head and arms building head and arms, taking the first steps

legs, LAVA R3X: the humanoid that walks and talks head and arms control, controlling the head and arms parts list, LAVA R3X: the humanoid that walks and talks resetting legs, controlling the head and arms responding to triggered sensor, walking until one of two sensors is triggered walking keeping legs in sync, my block #2: return reset procedure, making the robot walk returning motor to position, making the robot walk test program, my block #4: left turning left, my block #4: left until sensor is triggered, controlling the head and armsLEGO MINDSTORMS EV3 Education Core set, preparing your EV3 setLEGO MINDSTORMS EV3 Home Edition, preparing your EV3 setLEGO units, building with beams, axles, connector blocks, and motors half units, using half LEGO units using grid, using angled beamslength of beams and axles, building your first robotless than comparisons, the compare blocklifting mechanism for SNATCH3R, the grabber mechanismLogic array data wire, numeric array and logic arrayLogic data wire, repeating blocks with data wires using with Switch block, ending a loop in logic modeLogic mode, ending Loop block using, data wire value rangeLogic Operations block, the logic operations block, walking until one of two sensors istriggered modes for, the logic operations block

Not mode, logic operationsLogic variables, using variablesLoop block, understanding the WaitDisplay program breaking out of caveats, breaking a loop from the outside from inside, connecting data wires to blocks inside switch blocks from outside, connecting data wires to blocks inside switch blocks Compare mode, understanding compare, change, and measure mode data wires and, repeating blocks with data wires, data wire value range ending using Logic mode, data wire value range Loop Index, data wire value range modes for, understanding the WaitDisplay program naming, using the loop block nesting, using the loop block resizing, using the loop block sensors and, avoiding obstacles with the touch sensor Switch block in, using flat view and tabbed view using with Color Sensor, color modeLoop Interrupt block, connecting data wires to blocks inside switch blocksMM unit, building with beams, axles, connector blocks, and motors, using half LEGOunitsMath block, the math block Advanced mode, using advanced mode division operator, my block #2: return modulo operator, my block #2: return multiplication operator, my block #2: return

Measure mode, understanding compare, change, and measure mode Sensor blocks, using sensor blocks Timer block, the round blockmeasurements, using in calculations, the math blockMedium Motor calculating rotational speed, rotational speed connecting gears to, further exploration geometry of, connecting beams to the motor shaft Rotation Sensor and, driving and steering torque from, what is torque?Medium Motor block, the on and off modes in move blocksMemory Browser, troubleshooting the EV3microSD card adding memory, output ports, input ports, and cables folder for, renaming projects and programs using in the EV3, avoiding data loss using a microSD cardmission pad, sorting Technic elementsmodes, programming block, understanding modes and settingsmodules, building with beams, axles, connector blocks, and motorsmodulo operator (%), my block #2: returnmonster teeth, building with sensorsMore Robots tab, help documentationMotor Control app, selecting and running programsmotors as starting point for building, building with motors and sensors detecting stalled, understanding speed regulation

Large Motor (see Large Motor) Medium Motor (see Medium Motor) Move Steering block (see Move Steering block) Move Tank block, the on and off modes in move blocks moving at different speeds, the on and off modes in move blocks output ports, output ports, input ports, and cables Ports setting, understanding modes and settings position resetting, resetting the motor position Rotation Sensor and, using the brick buttons regulated vs. unregulated speed, understanding speed regulation Rotation Sensor, what are sensors? rotational speed, rotational speed the EV3 and, preparing your EV3 setMove Steering block, working with programming blocks: action blocks acceleration, making accurate turns accurate turns, making accurate turns Brake at End option, rotations, seconds, or degrees modes for, understanding modes and settings On/Off modes, the brick status light block, my block #2: return Power setting, understanding modes and settings Steering setting, understanding modes and settings using, working with programming blocks: action blocksMove Tank block, the on and off modes in move blocksmultiplication operator (*), my block #2: returnmultitasking

multiple Start blocks, managing my blocks in projects resource conflicts, avoiding resource conflicts splitting Sequence Wire, managing my blocks in projectsMy Blocks, creating a basic program copying to another project, managing my blocks in projects creating, using loop blocks within loop blocks, a my block with input and output data wires and, the text block editing, using loop blocks within loop blocks, a my block with input input for, the text block, a my block with input and output managing in project, using loop blocks within loop blocks output from, a my block with output, a my block with input and output sharing between projects, a my block with input and output troubleshooting missing, troubleshooting programs, the EV3 brick, and wireless connections uses for, a my block with input and output using, using loop blocks within loop blocks using data wires with, the text blockNnaming programs and blocks, missing variable definitionsnesting Loop blocks, using the loop blockNETGEAR WNA1100 N150 Wi-Fi USB Adapter, connecting to the EV3 withBluetoothNo Color tab, avoiding obstaclesnonfriction pins, building with beams, axles, connector blocks, and motors flexible structures, using half LEGO units friction pins vs., building your first robotNot mode, Logic Operations block, the logic operations block, logic operations

Note, Sound block, play typeNumeric array data wire, numeric array and logic arrayNumeric data wire, repeating blocks with data wiresNumeric mode, Random block, the random blockNumeric variables, using variablesOO-frame, building with beams, axles, connector blocks, and motorsobstacles, avoiding, avoiding obstacles, making ANTY walkOn Brick programs, creating and modifying programs, creating on brick programs blocks in, adding blocks to the loop, saving and opening a program creating, creating on brick programs downloaded programs vs., creating and modifying programs importing, saving and opening a program, importing on brick programs opening, saving and opening a program running, adding blocks to the loop saving, saving and opening a programOn For Rotations mode, making ANTY walkOn/Off modes, Move Steering block, the brick status light blockOr mode, Logic Operations block, the logic operations blockorganizer for storing pieces, sorting Technic elementsoutput gear, creating longer gear trainsoutput ports, output ports, input ports, and cablesOutside mode, logic operationsPPan tool, renaming projects and programsparallel beams

connecting, securing parallel beams securing, using connector blockspausing program, waiting, repeating, my blocks, and multitaskingperpendicular connections axles, connecting perpendicular axles gears, gear trains around a cornerpins, building your first robot, building with beams, axles, connector blocks, and motorsPlay Type setting, Sound block, making accurate turnsPort View tab, troubleshooting the EV3Ports setting, understanding modes and settingspower consumption and regulated speed, understanding speed regulation controlling motor speed, understanding modes and settingsProbability of True setting, the random blockProgramming Canvas, creating a basic programprogramming software (see EV3 programming software)programs, preparing your EV3 set (see also blocks (programming); On Brick programs) closing, running selected blocks creating project for, creating and modifying programs decompiling, managing the EV3’s memory Demo program, selecting and running programs downloading to the EV3, creating and modifying programs, 3. programming canvas using Bluetooth, avoiding data loss using a microSD card using Wi-Fi, connecting to the EV3 with Bluetooth finding on the EV3, renaming projects and programs

pausing, waiting, repeating, my blocks, and multitasking placing blocks in, creating a basic program projects vs., running selected blocks renaming, renaming projects and programs running after downloading, 3. programming canvas manually, 3. programming canvas on the EV3, selecting and running programs troubleshooting, missing variable definitions saving, running selected blocks testing changes in, troubleshooting a running program using My Blocks in, using loop blocks within loop blocksprojects closing, running selected blocks copying My Blocks to, managing my blocks in projects finding on the EV3, renaming projects and programs managing My Blocks in, using loop blocks within loop blocks one per robot, renaming projects and programs opening, running selected blocks programs vs., running selected blocks properties for, renaming projects and programs renaming, renaming projects and programs sharing My Blocks between, a my block with input and outputProximity mode, using the infrared sensor avoiding obstacles, avoiding obstaclesPythagorean theorem, gear trains around a corner

RRAC3 TRUCK robot, help documentationRadius setting, Display block, clear screenradius, of gears, working with the unit gridRandom block, the random blockRange block, logic operationsRead mode, using the variable blockReflected Light Intensity mode, using the color sensor, the switch block in measuremode following line smoothly, following a line more smoothly threshold value, setting the threshold valueRefresh button, troubleshooting the EV3regulated speed, understanding speed regulationreinforcing structures, using beams to reinforce structuresremote control, the mission pad application, selecting and running programs batteries for, the EV3 brick controlling robot with, the mission pad program for Formula EV3 Race Car, testing the my blocks program for SNATCH3R, creating the remote control program using with Infrared Sensor, remote modeRemote mode, Infrared Sensor, remote moderenaming programs, renaming projects and programsReset mode, Timer block, the round blockresource conflicts, avoiding resource conflictsrestarting the EV3, managing the EV3’s memoryrobots (see individual robots)

rotation direction of gear trains, creating longer gear trains reversing direction of, preventing axles from twisting speed of, calculating the gear ratio for two gearsRotation Sensor, using the brick buttons controlling wheel orientation, driving and steering Etch-A-Sketch program coordinates, step 1: creating basic drawings keeping legs in sync, my block #2: return motor position, using the brick buttons motor position, resetting, resetting the motor position purpose of, what are sensors? regulated speed and, understanding speed regulation resetting SNATCH3R grabber, controlling the grabber rotational speed, resetting the motor position calculating, rotational speed measuring in program, rotational speedRotations mode, understanding modes and settingsRound block, the round blockRun Recent tab, turning the EV3 on and offRun Selected command, running selected blocksrunning programs after downloading, 3. programming canvas manually, 3. programming canvas on the EV3, selecting and running programs troubleshooting, missing variable definitionsS

saving programs, running selected blocksSD_Card folder, avoiding data loss using a microSD cardSeconds mode, understanding modes and settingsSelect tool, renaming projects and programsSensor blocks, creating a basic program, using sensor blocks (see also individual Sensor blocks) Measure mode, using sensor blockssensors, what are sensors? blocks allowing use of, viewing sensor values Brick Buttons, using the brick buttons and rotation sensors building with, building with sensors built-in, using the brick buttons and rotation sensors Change mode, understanding compare, change, and measure mode Color Sensor (see Color Sensor) Compare mode, understanding compare, change, and measure mode Infrared Sensor (see Infrared Sensor) input ports, output ports, input ports, and cables Loop block and, avoiding obstacles with the touch sensor Measure mode, understanding compare, change, and measure mode measurement types, viewing sensor values Port setting, sensors and the wait block Rotation Sensor (see Rotation Sensor) Switch block and, sensors and the loop block adding blocks to, sensors and the switch block in action configuring, configuring a switch block Touch Sensor (see Touch Sensor)

types of, understanding sensors using multiple, avoiding obstacles viewing values for, viewing sensor values Wait block and, viewing sensor valuesSequence Wires, 3. programming canvas multitasking via splitting, managing my blocks in projectsService Set Identifier (SSID), connecting to the EV3 with BluetoothServo Motors (see motors)Settings tab, turning the EV3 on and offShapes mode, Display block, understanding the SoundCheck programsharing My Blocks, a my block with input and outputSK3TCHBOT robot, building SK3TCHBOT (see also data wires) building, building SK3TCHBOT coordinates on screen, step 1: creating basic drawings parts list, building SK3TCHBOT pencil controls clearing screen, clearing the screen moving without drawing, completing the basic program pencil size, clearing the screen using as eraser, completing the basic programslash symbol (/), my block #2: returnsmartphone, controlling robot with, the mission padSNATCH3R robot, the SNATCH3R: the autonomous robotic arm Beacon Heading measurements and, my block #4: search building, building the SNATCH3R

grabber mechanism, the SNATCH3R: the autonomous robotic arm controlling, controlling the grabber troubleshooting, creating the remote control program lifting mechanism, the grabber mechanism parts list, building the SNATCH3R remote control program, creating the remote control program searching for IR Beacon building IR bug, creating the remote control program driving toward beacon, creating the final program lifting and moving beacon, driving toward the beacon search algorithm, my block #4: searchsorting elements in organizer, sorting Technic elementsSound block, making accurate turns Duration setting, play type Note or Tone for, play type Play File mode, making accurate turns Play Type setting, making accurate turns signaling progress using, troubleshooting a running program volume, making accurate turnsspeed adjusting using data wires, repeating blocks with data wires balancing with torque, further increasing torque and decreasing speed calculating for gears, calculating the gear ratio for two gears decreasing, using worm gear, connecting perpendicular axles increasing and decreasing using gears, calculating the gear ratio for two gears regulated vs. unregulated, understanding speed regulation

spur gears, friction and backlashSSID (Service Set Identifier), connecting to the EV3 with Bluetoothstalled motors, understanding speed regulationStart block, creating a basic program multitasking using multiple, managing my blocks in projectsState mode, avoiding obstacles with the touch sensorstatus light, turning the EV3 on and off, the display block in actionsteering Formula EV3 Race Car centering, my block #2: left left and right, my block #2: left resetting, driving and steering Move Steering block modes for, understanding modes and settings using, working with programming blocks: action blocks Steering setting, understanding modes and settingsstickers on panels, sorting Technic elementsstructure aligning with LEGO unit grid, using angled beams flexible structures, using half LEGO unitssub modes, understanding the SoundCheck programSwitch block, sensors and the loop block adding blocks to, sensors and the switch block in action Change mode, understanding compare, change, and measure mode Compare mode, understanding compare, change, and measure mode comparing sensor values with threshold, setting the threshold value

configuring, configuring a switch block connecting data wires to block inside, connecting data wires to blocks inside switch blocks data wires and, ending a loop in logic mode determining wheel orientation, my block #2: left determining which button is pressed, using the brick buttons Measure - Color mode, the switch block in measure mode Numeric mode, ending a loop in logic mode repeating, using flat view and tabbed view using Random block with, the random block using with Beacon Heading mode, beacon heading mode using with Color Sensor, color modeswords, building with sensorssynchronizing leg movements, my block #2: returnTTabbed View, using flat view and tabbed viewtablet, controlling robot with, the mission padtank tread, connecting beams to the motor shaftTechnic line EV3 set, preparing your EV3 set sorting elements, sorting Technic elementstest track, color modetesting program changes, troubleshooting a running program using Display block, understanding the SoundCheck programText block, the round blockText data wire, repeating blocks with data wires

Text mode, Display block, clear screenText variables, using variablesthin elements, using half LEGO unitsthreshold values, setting the threshold valueTimer block, the round blockTone, Sound block, play typetoolbar, programming software, renaming projects and programstorque, decreasing and increasing rotational speed balancing with speed, further increasing torque and decreasing speed decreasing, what is torque? gears and, further increasing torque and decreasing speed increasing, what is torque?, creating longer gear trainsTouch Sensor, what are sensors? avoiding obstacles, sensors and the wait block Change mode, avoiding obstacles with the touch sensor, understanding compare, change, and measure mode combining with other sensors, avoiding obstacles Compare mode, avoiding obstacles with the touch sensor, configuring a switch block, understanding compare, change, and measure mode, compare mode and beacon values creating bumper using, what are sensors? determining motor position, understanding the walking mechanism LAVA R3X, making the robot walk Measure mode, understanding compare, change, and measure mode State mode, avoiding obstacles with the touch sensor Switch block and, sensors and the loop blockTRACK3R robot, the EV3 bricktroubleshooting

compilation errors missing My Block, troubleshooting programs, the EV3 brick, and wireless connections missing variable definition, missing variable definitions programming block errors, troubleshooting programs, the EV3 brick, and wireless connections EV3 brick connections, troubleshooting the EV3 Hardware Page, troubleshooting the EV3 memory management, troubleshooting the EV3 restarting, managing the EV3’s memory updating firmware, managing the EV3’s memory using USB connection, managing the EV3’s memory grabber mechanism, SNATCH3R, creating the remote control program running programs, missing variable definitions turning opposite direction from expected, the move steering block in action USB connection, creating and modifying programsturning robot accurate turns, making accurate turns curved turns, making accurate turns opposite direction from expected, the move steering block in actionturning the EV3 on/off, turning the EV3 on and offtwisting of axles, preventing axles from twistingUunit grid, working with the unit gridUnregulated Motor block, understanding speed regulationunregulated speed, understanding speed regulation

updating firmware, creating and modifying programsuploading file to computer, managing the EV3’s memoryUSB connection for loading programs, preparing your EV3 set for programming robot, output ports, input ports, and cables to external devices, output ports, input ports, and cables troubleshooting, creating and modifying programs, managing the EV3’s memory when creating programs, creating and modifying programsVVariable block, using variables Constant block vs., using the variable block defining variables in, using the variable block using in program, using the variable blockvariables, using constants and variables calculating average using, calculating an average changing values, changing and incrementing variable values defining, using variables incrementing values, changing and incrementing variable values initializing start value, changing and incrementing variable values troubleshooting missing definitions, missing variable definitions types for, using variablesView mode, conclusionvolume, Sound block, making accurate turnsWWait block, waiting, repeating, my blocks, and multitasking Change mode, understanding compare, change, and measure mode

Compare mode, understanding compare, change, and measure mode data wires and, data wire value range sensors and, viewing sensor values Touch Sensor mode, viewing sensor values using with Color Sensor, color modewalking mechanism for ANTY, understanding the walking mechanismwheels connecting to Large Motor, connecting beams to the motor shaft controlling orientation, driving and steeringWi-Fi, downloading programs using, connecting to the EV3 with Bluetoothwireless programming Bluetooth connecting with, finding a Bluetooth dongle dongles, finding a Bluetooth dongle downloading programs, avoiding data loss using a microSD card Wi-Fi, connecting to the EV3 with Bluetoothworm gears, friction and backlash, connecting perpendicular axles, the grabbermechanismXXOR mode, Logic Operations block, the logic operations blockZZoom tool, renaming projects and programs

About the AuthorLaurens Valk is a member of the MINDSTORMS Community Partners, a select group ofexperts who help test and develop new MINDSTORMS products, and his model isfeatured as one of the bonus robots on the EV3 packaging. Valk is the author of thebestselling LEGO MINDSTORMS NXT 2.0 Discovery Book (No Starch Press) and heblogs about robots at robotsquare.com.

The LEGO® MINDSTORMS® EV3 Discovery Book: a beginner’sguide to building and programming robotsLaurens ValkCopyright © 2014THE LEGO® MINDSTORMS® EV3 DISCOVERY BOOK.All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,electronic or mechanical, including photocopying, recording, or by any information storage or retrievalsystem, without the prior written permission of the copyright owner and the publisher.Second printing18 17 16 15 14 2 3 4 5 6 7 8 9ISBN-10: 1-59327-532-3ISBN-13: 978-1-59327-532-7Publisher: William PollockProduction Editor: Serena YangInterior Design: Octopod StudiosDevelopmental Editor: Seph KramerTechnical Reviewer: Claude BaumannCopyeditor: Julianne JigourCompositors: Riley Hoffman and Alison LawProofreader: Paula L. FlemingIndexer: BIM Indexing & Proofreading ServicesFor information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly:The Library of Congress has cataloged the first edition as follows:Valk, Laurens. The LEGO Mindstorms NXT 2.0 discovery book : a beginner’s guide to building and programming robots / La p. cm. Includes index. ISBN-13: 978-1-59327-211-1 ISBN-10: 1-59327-211-11. Robots--Design and construction--Popular works. 2. Robots--Programming--Popular works. 3. LEGO toys. I. Title. TJ211.15.V353 2010 629.8’92--dc22 2010011157No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Otherproduct and company names mentioned herein may be the trademarks of their respective owners. Rather thanuse a trademark symbol with every occurrence of a trademarked name, we are using the names only in aneditorial fashion and to the benefit of the trademark owner, with no intention of infringement of thetrademark.LEGO®, MINDSTORMS®, the brick configuration, and the minifigure are trademarks of the LEGO Group,which does not sponsor, authorize, or endorse this book.The information in this book is distributed on an “As Is” basis, without warranty. While every precaution hasbeen taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liabilityto any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectlyby the information contained in it.No Starch Press2014-10-07T11:10:01-07:00

The LEGO® MINDSTORMS® EV3 Discovery Book: abeginner’s guide to building and programming robotsTable of Contents about the author about the technical reviewer acknowledgments introduction why this book? is this book for you? how does this book work? the discoveries estimating difficulty and time finding solutions what to expect in each chapter part I: getting started part II: programming robots with sensors part III: robot building techniques part IV: vehicle and animal robots part V: creating advanced programs part VI: machine and humanoid robots the companion website conclusion I. getting started 1. preparing your EV3 set what’s in the box? the EV3 brick sorting Technic elements the mission pad controlling your robot downloading and installing the EV3 programming software conclusion 2. building your first robot using the building instructions building the EXPLOR3R output ports, input ports, and cables navigating the EV3 brick turning the EV3 on and off

selecting and running programs making your robot move with the remote control conclusion3. creating and modifying programs a quick first program creating a basic program 1. programming palette 2. start block 3. programming canvas 4. hardware page downloading and running a program manually running a program downloading a program without running it running selected blocks projects and programs 5. file organization saving projects and programs renaming projects and programs finding projects and programs on the EV3 brick modifying project properties 6. toolbar using select, pan, and zoom tools using the comment tool duplicating one or more blocks help documentation 7. content editor building the official EV3 robots and bonus models conclusion4. working with programming blocks: action blocks how do programming blocks work? the move steering block the move steering block in action understanding modes and settings ports steering power rotations, seconds, or degrees brake at end making accurate turns

the sound block understanding the sound block settings file name volume play type note or tone duration seeing the sound block in action understanding the SoundCheck program the display block understanding the display block settings sub modes file name clear screen radius and fill color text and font size x, y, column, and row the display block in action understanding the DisplayTest program the brick status light block the on and off modes in move blocks move tank, large motor, and medium motor blocks further exploration5. waiting, repeating, my blocks, and multitasking the wait block using the wait block settings seeing the wait block in action understanding the WaitDisplay program the loop block using the loop block seeing the loop block in action using loop blocks within loop blocks making your own blocks: the my block creating my blocks using my blocks in programs editing my blocks managing my blocks in projects multitasking

using multiple start blocks splitting the sequence wire avoiding resource conflicts further explorationII. programming robots with sensors 6. understanding sensors what are sensors? understanding the sensors in the EV3 set understanding the touch sensor creating the bumper with the touch sensor viewing sensor values programming with sensors sensors and the wait block sensors and the wait block in action avoiding obstacles with the touch sensor using change mode sensors and the loop block sensors and the switch block configuring a switch block sensors and the switch block in action adding blocks to a switch block using flat view and tabbed view repeating switches understanding compare, change, and measure mode compare mode change mode measure mode configuring the modes further exploration 7. using the color sensor attaching the color sensor color mode staying inside a colored line creating the test track creating the program following a line the switch block in measure mode reflected light intensity mode setting the threshold value

comparing sensor values with a threshold following a line more smoothly ambient light intensity mode measuring ambient light intensity a morse code program further exploration 8. using the infrared sensor proximity mode avoiding obstacles combining sensors remote mode beacon proximity mode beacon heading mode combining sensor operation modes further exploration 9. using the brick buttons and rotation sensors using the brick buttons using the rotation sensor motor position resetting the motor position rotational speed calculating the rotational speed measuring rotational speed in a program understanding speed regulation seeing speed regulation in action stopping a stalled motor further explorationIII. robot-building techniques 10. building with beams, axles, connector blocks, and motors using beams and frames extending beams using frames using beams to reinforce structures using angled beams using the LEGO unit grid using axles and cross holes using connector blocks extending axles connecting parallel beams

connecting beams at right angles securing parallel beams using half LEGO units using thin elements creating flexible structures building with motors and sensors building with the large motor connecting wheels and treads connecting beams to the motor shaft building with the medium motor building with sensors miscellaneous elements further exploration11. building with gears gearing essentials taking a closer look at gears calculating the gear ratio for two gears calculating output speed calculating the required gear ratio decreasing and increasing rotational speed what is torque? when do you increase torque? decreasing torque creating longer gear trains calculating the compound gear ratio further increasing torque and decreasing speed balancing speed and torque friction and backlash using the gears in the EV3 set working with the unit grid gears and half units gear trains around a corner using improper combinations using bevel and double-bevel gears perpendicular connections on the unit grid connecting perpendicular axles using knob wheels using worm gears constructing sturdy gear trains


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook