Introduction

A robot is only as good as the instructions that it’s given. Even the best-designed robots need clear and concise instructions to perform at their best. With the knowledge in this book, you will be able to expand your programming skills, as well as avoid many of the common pitfalls that NXT-G software writers fall into.

Who This Book Is For

This book is for individuals or teams that compete in any LEGO robotics competitions. The techniques covered in this book are intended to build upon a reader’s existing basic NXT-G skill set. In this book, the entire program development process is covered—from brainstorming, to logic flow, and then finally to the actual writing of the code. All of these steps are important.

You will also find many examples of useful code for making the most of your robot’s sensors and motors. Each of the sensors is addressed using real-world competition scenarios that give examples of how you can make your robot’s program effective in completing the necessary missions.

Many coders find the basics of NXT-G easy to pick up on their own, but then struggle to learn the more advanced ideas that can be the difference between a good robot and a winning robot. The tips and methods explained in this book will help give any team the edge it needs at an event.

How This Book Is Structured

Chapters 1 and 2 introduce the NXT-G development environment and the design process we recommend when writing code.

Chapters 3 through 6 cover some key topics that help you take your code to the next level and write competition-quality programs. You’ll learn about modularizing with My Blocks, about debugging and troubleshooting when things go wrong, how to move data efficiently, and generally how to make good decisions in designing your programs.

Chapters 7 through 10 detail each of the input sensors and motors that your NXT-G code will be interacting with as it attempts to complete various missions. The examples start out simple and then build in complexity to help you better understand the concepts that make the most of each available input and output device.

The final chapters cover complex code management and useful tips and tricks that can benefit any NXT-G programmer—not only in competitions but generally anytime anyone wishes to develop advanced skills for working with the LEGO MINDSTORMS system.

Supplementary Downloads

For those of you who have purchased the black and white print version of this book, we’ve made the color versions of each image available for download from the book’s apress.com webpage, which can be found at www.apress.com/9781430245360. Just click on the Source Code/Downloads tab, which will reveal the download link.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.121.131