contents in detail introduction xv xv why this book xvi prerequisites about this book xvi online resources xviii parT i programming basics chapter 1 your lego boosT creative toolbox 3 speaking LEGO 4 programming your robots 5 let’s build a robot 6 chapter 2 it’s me Mario 7 building MARIO 8 the Creative Canvas 13 MARIO’s first program 16 what you’ve learned 20 chapter 3 getting around with Motor blocks 21 22 using pseudocode to plan your program 22 coding with BOOST 23 differential drive robots 26 there and back Drivebase Move Steering for Time vs Drivebase Move Tank for Time 26 three new Move blocks 29 what you’ve learned 30 chapter 4 moving your robot precisely 31 rotation sensors 31 the Drivebase Move Steering for Angle block 32 visualizing angles of rotation 33 x conTenTs in deTail
calculating the Degrees input to move precisely moving a precise distance 34 35 turning by a set angle 37 calculating the Degrees input to turn precisely 38 what you’ve learned 41 chapter 5 repeating actions with loops 43 traveling along a square path 43 Loop blocks 45 what you’ve learned 46 chapter 6 hi i’m an explorer 47 the LEGO BOOST sensor 47 building the sensor head 48 measure distance with Sensor blocks 49 avoiding obstacles 49 triggering actions 50 51 52 testing sound effects 53 54 triggering a sound recording sounds 54 editing and deleting custom sounds 56 what you’ve learned 56 chapter 7 detecting colors 57 color detection tips 57 Color Sensor blocks 58 building the Color Controller 58 color commands 61 program description 62 recording custom sounds 63 testing the program 63 what you’ve learned 64 trigger conflicts playing sounds parT ii intermediate techniques chapter 8 a line-following robot 67 a simple approach to robot navigation 67 the Switch block 68 understanding data types 68 the Compare blocks 68 MARIO line-following version 69 line-following with one switch block 70 problems with communication delay 71 improving line-following with Switch blocks 72 monitoring sensor values 73 waiting for custom conditions 74 conTenTs in deTail xi
solving the wall-following problem using the Switch block using Start on True blocks a smoother wall-following program with math triggering sequences with custom conditions 76 comparing colors 77 repeating actions while a condition is true 78 what you’ve learned 78 chapter 9 following walls 79 82 using Wait blocks 82 Using the Wait for True blocks 82 83 84 84 proportional steering 85 adjusting R and K 87 backing out of corners 87 what you’ve learned 88 chapter 10 a voice-activated robot 89 Sound Sensor blocks 89 clapper switch 90 clapper navigator 90 Tilt Sensor blocks 91 hey put me down 92 detecting a sudden hit 94 Light blocks 95 random actions 95 random numbers 95 randomizing colors and sounds 96 starting parallel sequences 97 98 the interrupting robot joke building the program 99 what you’ve learned 100 chapter 11 taking a look around 101 building the scanner head 102 single-motor blocks 104 using the rotation sensors 105 scanning 106 moving relative to a zero position 107 resetting the scanner head 109 making composite blocks 110 making composite blocks with inputs 112 editing and removing composite blocks 114 adding inputs 115 deleting inputs 115 deleting a composite block 115 hand following 116 storing numbers with variables 117 xii conTenTs in deTail
navigating around clutter 118 what you’ve learned 120 chapter 12 playing darts 121 remote control blocks 122 making a remote control for MARIO 123 adding the Button Widget to the remote control 125 building the shooter and the target 126 QuickDraw a dart-shooting game 128 program description 128 the composite blocks 130 making the main program 133 using the remote control 133 automatic shooting 133 the Reload composite block 134 how the program works 135 what you’ve learned 136 chapter 13 building techniques 137 LEGO geometry 137 SNOT building 138 139 making your robots strong and sturdy using Technic connections 139 bracing techniques 140 understanding the angular beams 141 working with gears 142 when to use gears 144 getting gears to mesh well 145 perfect and imperfect gear combinations 146 146 meshing gears on parallel axles meshing gears at right angles 147 driving the turntable 148 gear racks 150 153 longer gear trains transforming motion 155 motor assemblies 158 what you’ve learned 159 parT iii brickpecker chapter 14 brickpecker a brick-sorting bird 163 one motor for two movements 186 what you’ve learned 186 chapter 15 programming brickpecker 187 understanding the gear train 188 the Reset composite block 189 the Spinning composite block 191 conTenTs in deTail xiii