Building Robots with LEGO Mindstorms NXT
By Mario Ferrari and Guilio Ferrari
3.5/5
()
About this ebook
The new MINDSTORMS kit has been updated to include a programming brick, USB cable, RJ11-like cables, motors, and sensors. This book updates the robotics information to be compatible with the new set and to show how sound, sight, touch, and distance issues are now dealt with.
The LEGO MINDSTORMS NXT and its predecessor, the LEGO MINDSTORMS Robotics Invention System (RIS), have been called "the most creative play system ever developed." This book unleashes the full power and potential of the tools, sensors, and components that make up LEGO MINDSTORMS NXT. It also provides a unique insight on newer studless building techniques as well as interfacing with the traditional studded beams. Some of the world's leading LEGO MINDSTORMS inventors share their knowledge and development secrets. You will discover an incredible range of ideas to inspire your next invention. This is the ultimate insider's look at LEGO MINDSTORMS NXT system and is the perfect book whether you build world-class competitive robots or just like to mess around for the fun of it.
Featuring an introduction by astronaut Dan Barry and written by Dave Astolfo, Invited Member of the MINDSTORMS Developer Program and MINDSTORMS Community Partners (MCP) groups, and Mario and Guilio Ferrari, authors of the bestselling Building Robots with LEGO Mindstorms, this book covers:
Understanding LEGO Geometry
Playing with Gears
Controlling Motors
Reading Sensors
What's New with the NXT?
Building Strategies
Programming the NXT
Playing Sounds and Music
Becoming Mobile
Getting Pumped: Pneumatics
Finding and Grabbing Objects
Doing the Math
Knowing Where You Are
Classic Projects
Building Robots That Walk
Robotic Animals
Solving a Maze
Drawing and Writing
Racing Against Time
Hand-to-Hand Combat
Searching for Precision
*Complete coverage of the new Mindstorms NXT kit
*Brought to you by the DaVinci's of LEGO
*Updated edition of a bestseller
Mario Ferrari
Mario Ferrari received his first Lego box around 1964, when he was 4. Lego was his favorite toy for many years, until he thought he was too old to play with it. In 1998, the Lego Mindstorms RIS set gave him reason to again have Lego become his main addiction. Mario believes Lego is the closest thing to the perfect toy. He is Managing Director at EDIS, a leader in finishing and packaging solutions and promotional packaging. The advent of the MINDSTORMS product line represented for him the perfect opportunity to combine his interest in IT and robotics with his passion for LEGO bricks, which started during his early childhood. Mario has been a very active member of the online MINDSTORMS community from the beginning and has pushed LEGO robotics to its limits. Mario holds a bachelor's degree in Business Administration from the University of Turin and has always nourished a strong interest for physics, mathematics, and computer science. He is fluent in many programming languages and his background includes positions as an IT manager and as a project supervisor. Mario estimates he owns over 60,000 Lego pieces. Mario works in Modena, Italy, where he lives with his wife Anna and his children Sebastiano and Camilla.
Related to Building Robots with LEGO Mindstorms NXT
Related ebooks
Building Robots With Lego Mindstorms Rating: 3 out of 5 stars3/5Building Robots with LEGO Mindstorms NXT Rating: 3 out of 5 stars3/5Getting Started with LEGO Robotics: A Guide for K-12 Educators Rating: 0 out of 5 stars0 ratingsProgramming Lego Mindstorms NXT Rating: 3 out of 5 stars3/5Learning LEGO MINDSTORMS EV3 Rating: 5 out of 5 stars5/5Building with Virtual LEGO: Getting Started with LEGO Digital Designer, LDraw, and Mecabricks Rating: 0 out of 5 stars0 ratingsScratch 2.0 Beginner's Guide Second Edition Rating: 4 out of 5 stars4/5The Big Book of Makerspace Projects: Inspiring Makers to Experiment, Create, and Learn Rating: 5 out of 5 stars5/5Mission Python Rating: 0 out of 5 stars0 ratingsBuilding Minecraft Server Modifications - Second Edition Rating: 4 out of 5 stars4/5Scratch Cookbook Rating: 0 out of 5 stars0 ratingsCode-It Workbook 2: Choices In Programming Using Scratch Rating: 0 out of 5 stars0 ratingsThe Maker's Guide to Building Robots: A Step-by-Step Guide to Ordering Parts, Using Sensors and Lights, Programming, and More Rating: 0 out of 5 stars0 ratingsKids Can Code!: Fun Ways to Learn Computer Programming Rating: 0 out of 5 stars0 ratingsHealth Idea Building Instruction Guide for LEGO® Education SPIKE™ Prime 11 Boxing Rating: 0 out of 5 stars0 ratingsProgramming the BBC Micro Rating: 0 out of 5 stars0 ratingsScratch Projects for 9-10 year olds: Scratch Short and Easy with Ready-Steady-Code Rating: 0 out of 5 stars0 ratingsGameSalad Essentials Rating: 0 out of 5 stars0 ratingsRobotics: Discover the Science and Technology of the Future with 20 Projects Rating: 0 out of 5 stars0 ratingsThe LEGO Arduino Cookbook: Expanding the Realm of MINDSTORMS EV3 Invention Rating: 0 out of 5 stars0 ratingsSCRATCH Projects for 8-9 year olds: Scratch Short and Easy with Ready-Steady-Code Rating: 0 out of 5 stars0 ratingsPython Robotics for Kids: A Guide to Spike Prime Robot with Object-Oriented Programming: Robotics, #1 Rating: 0 out of 5 stars0 ratingsA World of Programming Rating: 0 out of 5 stars0 ratingsRobotics!: With 25 Science Projects for Kids Rating: 0 out of 5 stars0 ratingsCrayola ® Art of Coding: A Celebration of Creative Mindsets Rating: 0 out of 5 stars0 ratingsArduino App Bluetooth Robotics Rating: 0 out of 5 stars0 ratingsCocos2D Game Development Essentials Rating: 0 out of 5 stars0 ratingsInstant Play Framework Starter Rating: 0 out of 5 stars0 ratingsUnreal Engine Physics Essentials Rating: 1 out of 5 stars1/5Programming and Customizing the Multicore Propeller Microcontroller: The Official Guide Rating: 4 out of 5 stars4/5
Mathematics For You
Mental Math Secrets - How To Be a Human Calculator Rating: 5 out of 5 stars5/5Algebra - The Very Basics Rating: 5 out of 5 stars5/5Geometry For Dummies Rating: 5 out of 5 stars5/5Algebra I Workbook For Dummies Rating: 3 out of 5 stars3/5Basic Math & Pre-Algebra For Dummies Rating: 4 out of 5 stars4/5Precalculus: A Self-Teaching Guide Rating: 5 out of 5 stars5/5See Ya Later Calculator: Simple Math Tricks You Can Do in Your Head Rating: 4 out of 5 stars4/5Quantum Physics for Beginners Rating: 4 out of 5 stars4/5Basic Math & Pre-Algebra Workbook For Dummies with Online Practice Rating: 4 out of 5 stars4/5The Little Book of Mathematical Principles, Theories & Things Rating: 3 out of 5 stars3/5Must Know High School Algebra, Second Edition Rating: 0 out of 5 stars0 ratingsRelativity: The special and the general theory Rating: 5 out of 5 stars5/5Introducing Game Theory: A Graphic Guide Rating: 4 out of 5 stars4/5Game Theory: A Simple Introduction Rating: 4 out of 5 stars4/5A Mind for Numbers | Summary Rating: 4 out of 5 stars4/5Calculus Made Easy Rating: 4 out of 5 stars4/5The Golden Ratio: The Divine Beauty of Mathematics Rating: 5 out of 5 stars5/5The Everything Guide to Algebra: A Step-by-Step Guide to the Basics of Algebra - in Plain English! Rating: 4 out of 5 stars4/5Summary of The Black Swan: by Nassim Nicholas Taleb | Includes Analysis Rating: 5 out of 5 stars5/5ACT Math & Science Prep: Includes 500+ Practice Questions Rating: 3 out of 5 stars3/5Real Estate by the Numbers: A Complete Reference Guide to Deal Analysis Rating: 0 out of 5 stars0 ratingsIs God a Mathematician? Rating: 4 out of 5 stars4/5The Everything Everyday Math Book: From Tipping to Taxes, All the Real-World, Everyday Math Skills You Need Rating: 5 out of 5 stars5/5The Elements of Euclid for the Use of Schools and Colleges (Illustrated) Rating: 0 out of 5 stars0 ratingsMy Best Mathematical and Logic Puzzles Rating: 5 out of 5 stars5/5
Reviews for Building Robots with LEGO Mindstorms NXT
3 ratings0 reviews
Book preview
Building Robots with LEGO Mindstorms NXT - Mario Ferrari
Robotics
Preface
LEGO has been a part of my life since I was about four years old. My first sets were basic LEGO SYSTEM sets. However, I soon jumped to the early TECHNIC sets that were beginning to appear on the market. Because I was one of those kids who had to take everything apart to figure out how it worked, TECHNIC seemed like a good fit for me. The best part was that I was no longer breaking toys—a relief for my parents.
I remember sets such as the now-classic 856, 853, 855, and 8865. I don’t seem to have the original parts for any of these sets now. Like many other adult fans, I have gone through dark years during which some of my LEGO parts were sold, others were thrown out, and the rest were stored.
My interest in LEGO was rekindled in the late ’90s, however, when I read about the MINDTORMS Robotics Invention System (RIS) 1.0. The moment it was available for sale, I ordered mine, and I now find myself where I am now. I had wished for this sort of thing many years ago. Now with the advent of the NXT system, a whole new era of fun with robotics has begun.
In early 2006, I was honored to be one of the 100 testers chosen by LEGO as part of its MINDSTORMS Developer Program (MDP) for the beta testing of the new NXT system. Once the product went to market in fall of 2006, I was also invited by LEGO to be part of its MINDSTORMS Community Partner (MCP) Program, which has allowed a core group of adult fans to keep involved (with a great deal of excitement) with LEGO on upcoming features/releases for the NXT.
Since my initial RIS purchase, I have built up an inventory of more than 50,000 pieces, including three NXT sets, five RIS sets, three DDKs, one RDS, countless motors and sensors, and a whole slew of other TECHNIC pieces. Oddly enough, however, I still struggle to find parts when building robots.
A few years back, Syngress, now an imprint of Elsevier Inc., asked me to author building instructions in its now popular book, 10 Cool Lego Mindstorms Ultimate Builders Projects (ISBN: 1-931836-60-4). My chapter of the book provided details and instructions on how to build my RCX-based DominoBot. So when Syngress asked me in November 2006 to become the technical editor of this book, my answer, of course, was yes.
As many of you may know, this book is a revision to the bestseller written by Mario and Giulio Ferarri. My goal was to revise and update the content and make it specific to the NXT system. In addition to the revised content, you will notice a significant shift from the traditional brick-and-plate building approach to studless building techniques—the chapters are rife with ideas and approaches to help guide you and ensure that your robot-building experience is enjoyable! On behalf of myself and the rest of the authors of this book, we hope you enjoy the diverse and plentiful information within it.
David Astolfo,
Technical Editor
Understanding LEGO® Geometry
Solutions in this chapter:
Expressing Sizes and Units
Squaring the LEGO World: Vertical Bracing
Tilting the LEGO World: Diagonal Bracing
TECHNIC Liftarms: Angles Built In
Introduction
Before you enter the world of LEGO robotics, we want to be sure you know and understand some basic geometric properties of the LEGO bricks and beams. Don’t worry; we’re not going to test you with complex equations or trigonometry. We’ll just discuss some very simple concepts and explain some terminology that will make assembling actual systems easier from the very beginning.
You will discover which units LEGO builders use to express sizes, the proportions of the bricks and beams, and how this affects the way you can combine them with different orientations into a solid structure.
In the past few years, there has been a shift from building with TECHNIC bricks and beams to building with studless beams, pins, and connectors. After we introduce some basic concepts, you will be exposed to these new ideas and see examples of how you can use studless building.
We encourage you to try to reproduce all the examples we show in this chapter with your own LEGO parts. If for any reason, you feel that what we present is too complex or boring, don’t force yourself to read it. Skip the chapter and go to another one. You can always come back and use this chapter as a sort of glossary whenever you need it.
Expressing Sizes and Units
LEGO builders usually express the size of LEGO parts with three numbers, representing width, length, and height, in that order. The standard way to use LEGO bricks is studs up.
When expressing sizes, we always refer to this orientation, even when we are using the bricks upside down or rotating them in 3D space.
Height is the simplest property to identify. It’s the vertical distance between the top and bottom of the basic brick. Width, by convention, is the shorter of the two dimensions which lie on the horizontal plane (length is the other one). Both width and length are expressed in terms of studs, also called LEGO units. Knowing this, we can describe the measurements of the most traditional brick, the one whose first appearance dates back to 1949, which is 2 × 4 × 1 (see Figure 1.1).
Figure 1.1 The Traditional LEGO Brick
LEGO bricks, although their measurements are not expressed as such, are based on the metric system: A stud’s width corresponds to 8 mm and the height of a brick (minus the stud) to 9.6 mm. These figures are not important to remember. What’s important is that they do not have equal values, meaning you need two different units to refer to length and height. Their ratio is even more important: Dividing 9.6 by 8 you get 1.2 (the vertical unit corresponds to 1.2 times the horizontal one). This ratio is easier to remember if stated as a proportion between whole numbers: It is equivalent to 6:5. Figure 1.2 shows the smallest LEGO brick, described in LEGO units as a 1 × 1 × 1 brick. For the reasons explained previously, this LEGO cube
is not a cube at all.
Figure 1.2 Proportions in a 1 × 1 × 1 LEGO Brick
The LEGO system includes a class of components whose height is one-third of a brick. The most important element of this class is the plate, which comes in a huge variety of rectangular sizes, and in some special shapes too. If you stack three plates, you get the height of a standard brick (see Figure 1.3).
Figure 1.3 Three Plates Make One Brick in Height
The advent of studless building has thrown a wrench into our understanding and use of the classic brick-and-plate-construction approaches. The new studless components provide a different way to construct LEGO models. The jury is still out regarding which method is better or more preferred—there are proponents on both sides of the fence with this. Figure 1.4 shows the traditional plates and bricks next to a newer TECHNIC beam and a set of three liftarms that are stacked, all to provide some reference on size. You will notice that their stacked heights are not compatible across the studded (left) and studless (right) parts.
Figure 1.4 Comparing Bricks to Studless Beams and Liftarms
The one thing that is undeniable is that LEGO has made a significant shift with its TECHNIC and MINDSTORMS lines toward studless components. If you are a die-hard studded builder, you are encouraged to take the plunge and try building studless. Many found the change in approach a challenge at first, but use it almost exclusively now. Studless building offers countless options for connectivity and even allows for building at odd angles that was difficult to accomplish with traditional