Apress Access

Winning LEGO MINDSTORMS Programming

By James Trobaugh , Mannie Lowe

  • eBook Price: $20.99
Buy eBook Buy Print Book
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 competition.

Full Description

  • Add to Wishlist
  • ISBN13: 978-1-4302-4536-0
  • 252 Pages
  • User Level: Beginner to Intermediate
  • Publication Date: December 2, 2012
  • Available eBook Formats: EPUB, MOBI, PDF

Related Titles

  • Windows 10 for the Internet of Things
  • Scratch by Example
  • Building a Virtual Assistant for Raspberry Pi
  • Building Embedded Systems
Full Description

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.

What you’ll learn

  • Write programs to give your team an edge in competition.
  • Avoid common programming pitfalls that can cost points.
  • Write well-planned code easily adapted as you refine your approach to a challenge.
  • Collaborate with teammates in presenting a clear understanding of your coding solution to competition judges.
  • Improve your ability to wield each of the MINDSTORM NXT sensors.
  • Explore tips & tricks that can be used in robot competitions, and for fun.
  • Plan ahead for debugging and troubleshooting.

Who this book is for

Winning LEGO MINDSTORMS Programming is aimed at those wanting to improve their ability to create and deploy LEGO MINDSTORMS robots that are predictable and reliable at navigating competition challenges, and for fun at home.

Table of Contents

Table of Contents

1. Meeting the NXT-G Software

2. Software Design Process

3. Using and Creating MyBlocks

4. When Things Go Wrong

5. Moving Data

6. Making Smart Decisions

7. Motors and Motion

8. Light Detection

9. Touching and Bumping

10. Seeing with Ultrasonics

11. Programming Like A Pro

12 Code Management

13. Programming Pitfalls

14. NXT-G Tips & Tricks

Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.


If you think that you've found an error in this book, please let us know by emailing to editorial@apress.com . You will find any confirmed erratum below, so you can check if your concern has already been addressed.
No errata are currently published


    1. Practical LEGO Technics


      View Book

    2. Winning LEGO MINDSTORMS Programming


      View Book