Winning LEGO MINDSTORMS Programming [electronic resource] : LEGO MINDSTORMS NXT-G Programming for Fun and Competition /
Trobaugh, James.author.
Lowe, Mannie.author.
Winning LEGO MINDSTORMS Programming is your ticket to successfully programming for fun and competition with LEGO MINDSTORMS and the NXT-G programming language commonly used in FIRST LEGO League events. The book is a companion title to author James Trobaugh’s acclaimed book on physical robot design, Winning Design!. This new book focuses squarely on the programming side of working with MINDSTORMS. Together the two books put you on a rock-solid foundation for creating with LEGO MINDSTORMS, whether for fun at home or in competition with a team. Winning LEGO MINDSTORMS Programming sets the stage by emphasizing the importance of up front planning, and thinking about the challenge to be met. Learn to evaluate possible solutions by sanity-testing their logic before you put the effort into actually writing the code. Then choose your best option and write the code applying the techniques in this book. Take advantage of language features such as MyBlocks to enhance reliability and create easy-to-debug code. Manage your code as you change and improve it so that you can trace what you’ve done and fall back if needed. Avoid common programming pitfalls. Work powerfully with teammates to conquer competition challenges of all types. Provides solid techniques similar to those used by professional programmers, and optimized for the LEGO MINDSTORMS platform. Addresses key tasks important to competition such as line detection, line following, squaring of corners, motor stall detection, and more. Compliments Winning Design! by tackling the programming side of competition.
Title Page; Copyright Page; Dedication Page; Contents at a Glance; Table of Contents; About the Authors; About the Technical Reviewer; Acknowledgments; Introduction; Who This Book Is For; How This Book Is Structured; Supplementary Downloads; Chapter 1 Meeting the NXT-G Software; Flavors of NXT-G; The User Interface; Startup Panel; Program Block Palettes; Common Palette; Complete Palette; Custom Palette; Worksheet Panel; Properties Panel; Help Panel; Robot Educator; Map Panel; Controller; Toolbar; Connecting the NXT; USB; Bluetooth; Firmware; Summary; Chapter 2 Software Design Process
Choosing the Right ProblemDefine the Problem; Write Pseudo code; Identify Possible Solutions; Create the Code; Test the Solution; Summary; Chapter 3 Working with My Blocks; Why use My Blocks?; Starting Off Simple; Editing My Block contents; Using a My Block; My Block Properties; Single Property; Multiple Properties; Sharing Values; Managing and Sharing My Blocks; Broken Blocks; Pack and Go; Summary; Chapter 4 When Things Go Wrong; Walking the Code; Viewing Values; The NXT View menu; My Block Viewers; Alert My Block; Breaking the code down; Common Mistakes; Rotation Completion; Port Settings
Duration ValueEnvironment; Summary; Chapter 5 Moving Data; Data Wires; Variables; How It Works; Managing the Variables; Using the Variable Block; Scope; Constants; Defining a Constant; Custom Constant; Summary; Chapter 6 Making Smart Decisions; Switch Block; Basics; Advanced Switching; Variables; Nesting; Logic Block; Compare Block; Range Block; Summary; Chapter 7 Motors and Motion; Wheel Circumference; Programming to Go Straight; Move Block; Motor Block; Reset Motor Block; MyMove Blocks; Turning the Robot; Move Block; Motor Blocks; Calculating Turns; Single-Wheel Turn; Dual-Wheel Turn
Creating a Custom MyPivot BlockCreating a Custom MyTurn Block; Stall Detection; Summary; Chapter 8 Light Detection; NXT Light sensor; How It Works; Ambient Light; Reflective Light; Calibration; NXT-G Calibration Block; Local File; Viewing Calibration; Deleting Calibration; Line Following; Simple Condition; Complex Condition; Proportional; Dual Light Sensors; Line Detection; Finding the Line; Reading Colored Lines; Aligning with Lines and Edges; Summary; Chapter 9 Touching and Bumping; The Touch Sensor; Using the Touch Sensor; When Is Pressed Not Pressed?; Determining When to Turn; Squaring Up
Remote NXT Orange ButtonLimit Switch; Touch Sensor As an Indicator of an Object; Summary; Chapter 10 Seeing with Ultrasonics; How It Works; Making It Work on the Game Field; Finding Nearby Objects; Summary; Chapter 11 Programming Like a Pro; Data Arrays; State Machines; Master Programs; My Blocks; Simple Sequencer Program; The Scenario; Creating My Blocks; Creating the Sequencer; Looking at the Code; Better Sequencer; Program Navigation; Sequence Rollover; Advanced Sequencer; Program Display; Saving State; Summary; Chapter 12 Code Management; Single-Computer Scenario
Multiple-Computer Scenario
Includes index.
Winning LEGO MINDSTORMS Programming is your ticket to successfully programming for fun and competition with LEGO MINDSTORMS and the NXT-G programming language commonly used in FIRST LEGO League events. The book is a companion title to author James Trobaugh’s acclaimed book on physical robot design, Winning Design!. This new book focuses squarely on the programming side of working with MINDSTORMS. Together the two books put you on a rock-solid foundation for creating with LEGO MINDSTORMS, whether for fun at home or in competition with a team. Winning LEGO MINDSTORMS Programming sets the stage by emphasizing the importance of up front planning, and thinking about the challenge to be met. Learn to evaluate possible solutions by sanity-testing their logic before you put the effort into actually writing the code. Then choose your best option and write the code applying the techniques in this book. Take advantage of language features such as MyBlocks to enhance reliability and create easy-to-debug code. Manage your code as you change and improve it so that you can trace what you’ve done and fall back if needed. Avoid common programming pitfalls. Work powerfully with teammates to conquer competition challenges of all types. Provides solid techniques similar to those used by professional programmers, and optimized for the LEGO MINDSTORMS platform. Addresses key tasks important to competition such as line detection, line following, squaring of corners, motor stall detection, and more. Compliments Winning Design! by tackling the programming side of competition.
Computer input-output equipment.
Software engineering.
Computer programming.
Hardware and Maker.
Software Engineering/Programming and Operating Systems.
Programming Techniques.