Building Robots with LEGO Mindstorms NXT
By Mario Ferrari, Guilio Ferrari, David Astolfo and
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 authors
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/5Beginning LEGO MINDSTORMS EV3 Rating: 0 out of 5 stars0 ratingsLearning 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 ratingsGetting Started with LEGO Robotics: A Guide for K-12 Educators 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 ratingsProgramming the BBC Micro Rating: 0 out of 5 stars0 ratingsProgramming Lego Mindstorms NXT Rating: 3 out of 5 stars3/5The 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 ratingsBots! Robotics Engineering: with Hands-On Makerspace Activities Rating: 5 out of 5 stars5/5Arduino and LEGO Projects Rating: 0 out of 5 stars0 ratingsRaspberry Pi For Dummies Rating: 0 out of 5 stars0 ratingsExploring LEGO Mindstorms EV3: Tools and Techniques for Building and Programming Robots Rating: 5 out of 5 stars5/5Scratch 2.0 Beginner's Guide Second Edition Rating: 4 out of 5 stars4/5Programming the BBC micro:bit: Getting Started with MicroPython Rating: 0 out of 5 stars0 ratingsRobotics!: With 25 Science Projects for Kids Rating: 0 out of 5 stars0 ratingsRobotics: Discover the Science and Technology of the Future with 20 Projects Rating: 0 out of 5 stars0 ratingsGame Logic: Level Up and Create Your Own Games with Science Activities for Kids Rating: 0 out of 5 stars0 ratingsCoding with Basher: Coding with Scratch Rating: 0 out of 5 stars0 ratingsGetting Started with Raspberry Pi: Program Your Raspberry Pi! Rating: 4 out of 5 stars4/5Designing Digital Games: Create Games with Scratch! Rating: 0 out of 5 stars0 ratingsBuilding Minecraft Server Modifications - Second Edition Rating: 4 out of 5 stars4/5Build It! Medieval World: Make Supercool Models with Your Favorite LEGO® Parts Rating: 4 out of 5 stars4/5The LEGO Arduino Cookbook: Expanding the Realm of MINDSTORMS EV3 Invention Rating: 0 out of 5 stars0 ratingsBuilding Your Own Robots: Design and Build Your First Robot! Rating: 0 out of 5 stars0 ratingsArduino for Kids Rating: 0 out of 5 stars0 ratingsCode-It Workbook 2: Choices In Programming Using Scratch Rating: 0 out of 5 stars0 ratingsMission Python Rating: 0 out of 5 stars0 ratingsThe Everything Kids' Scratch Coding Book: Learn to Code and Create Your Own Cool Games! Rating: 4 out of 5 stars4/5
Security For You
How to Be Invisible: Protect Your Home, Your Children, Your Assets, and Your Life Rating: 4 out of 5 stars4/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5Hacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5Cybersecurity: The Beginner's Guide: A comprehensive guide to getting started in cybersecurity Rating: 5 out of 5 stars5/5How to Become Anonymous, Secure and Free Online Rating: 5 out of 5 stars5/5Mike Meyers CompTIA Security+ Certification Passport, Sixth Edition (Exam SY0-601) Rating: 5 out of 5 stars5/5CompTIA Network+ Review Guide: Exam N10-008 Rating: 0 out of 5 stars0 ratingsHacking: Ultimate Beginner's Guide for Computer Hacking in 2018 and Beyond: Hacking in 2018, #1 Rating: 4 out of 5 stars4/5Cybersecurity For Dummies Rating: 4 out of 5 stars4/5The Cyber Attack Survival Manual: Tools for Surviving Everything from Identity Theft to the Digital Apocalypse Rating: 0 out of 5 stars0 ratingsPractical Lock Picking: A Physical Penetration Tester's Training Guide Rating: 5 out of 5 stars5/5Social Engineering: The Science of Human Hacking Rating: 3 out of 5 stars3/5How to Hack Like a Pornstar Rating: 5 out of 5 stars5/5CompTIA CySA+ Practice Tests: Exam CS0-002 Rating: 0 out of 5 stars0 ratingsRemote/WebCam Notarization : Basic Understanding Rating: 3 out of 5 stars3/5CompTIA Security+ Study Guide: Exam SY0-601 Rating: 5 out of 5 stars5/5Wireless Hacking 101 Rating: 4 out of 5 stars4/5Make Your Smartphone 007 Smart Rating: 4 out of 5 stars4/5Network+ Study Guide & Practice Exams Rating: 4 out of 5 stars4/5The Art of Intrusion: The Real Stories Behind the Exploits of Hackers, Intruders and Deceivers Rating: 4 out of 5 stars4/5Ultimate Guide for Being Anonymous: Hacking the Planet, #4 Rating: 5 out of 5 stars5/5Mike Meyers' CompTIA Security+ Certification Guide, Third Edition (Exam SY0-601) Rating: 5 out of 5 stars5/5Dark Territory: The Secret History of Cyber War Rating: 4 out of 5 stars4/5CompTIA CySA+ Cybersecurity Analyst Certification Passport (Exam CS0-002) Rating: 5 out of 5 stars5/5Tor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5Codes and Ciphers 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