BN.com Gift Guide

Programming Lego Mindstorms NXT

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $33.06
Usually ships in 1-2 business days
(Save 23%)
Other sellers (Paperback)
  • All (4) from $33.06   
  • New (1) from $33.06   
  • Used (3) from $33.06   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$33.06
Seller since 2008

Feedback rating:

(17869)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand New, Perfect Condition, Please allow 4-14 business days for delivery. 100% Money Back Guarantee, Over 1,000,000 customers served.

Ships from: Westminster, MD

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by

Overview

Teach your robot new tricks! With this projects-based approach you can program your Mindstorms NXT robot to solve a maze, build a house, run an obstacle course, and many other activities. Along the way you will learn the basics of programming structures and techniques using NXT-G and Microsoft VPL. Includes a DVD w/ e-text, programming code, and link to accompanying website.

For hobbyists, and students working on robot projects, Bishop provides the background and tools to program your robot for tasks that go beyond the simple routines provided with the robot kit. The programs range in complexity from simple contact avoidance and path following, to programs generating some degree of artificial intelligence

• a how-to guide for programming your robot, using NXT-G and Microsoft VPL
• ten robot-specific projects show how to extend your robot's capabilities beyond the manufacturer's provided software. Examples of projects include:
Maze solver,
Robot House Builder,
Search (obstacle avoidance),
Song and Dance Act
• flowcharts and data flow diagrams are used to illustrate how to develop programs
• introduces basic programming structures
• includes a DVD w/ e-text, programming code, and link to accompanying website

Read More Show Less

Editorial Reviews

From the Publisher
1) electronic hobbyist (robot, microcontroller),
2) electronics (robot, microcontroller) projects at high school, votech, and college level.
Read More Show Less

Product Details

  • ISBN-13: 9781597492782
  • Publisher: Elsevier Science
  • Publication date: 6/30/2008
  • Edition description: New Edition
  • Pages: 200
  • Product dimensions: 7.40 (w) x 9.10 (h) x 0.60 (d)

Meet the Author

Author of over 70 books, mostly electronic and many in the field of science education. Contributor to numerous electronic magazines such as Everyday Practical Electronics, Elektor Electronics, Electronics Australia and Electronics Today International. Former Science Education Advisor in developing countries as staff member of the British Council and as a part of the UN Educational and Scientific Organisation.

Read More Show Less

Read an Excerpt

Programming Lego Mindstorms NXT


By Owen Bishop

Syngress Publishing, Inc.

Copyright © 2008 Elsevier, Inc.
All right reserved.

ISBN: 978-0-08-056996-3


Chapter One

Roborts and Programs

Introduction

Without a program, a robot is just an assembly of electronic and mechanical components. This book shows you how to give it a program.

The LEGO® Mindstorms® kit contains the parts and directions for building the following four different types of robots:

* A vehicle called a Tribot

* A machine called a RoboArm

* An animal called Spike the scorpion

* A humanoid Alpha Rex

Of these, Alpha Rex is closest to most people's idea of what a robot is. But Tribot and RoboArm are typical of robots commonly seen in industrial situations. It is a lot of fun building them, testing them with the few simple programs that come with the kit, and then getting them to do new and interesting things by writing your own programs.

As well as these four, there are dozens of other robots waiting to be built and programmed. For example, the monkey and the mouse in the book by Dave Astolfo, Mario Ferrari, and Guilio Ferrari, "Building Robots with LEGO Mindstorms NXT" (Syngress, 2007). There are also dozens of robots that you can invent and program using the same kit of parts!

In this book, the programs and program snippets are written using the Mindstorms NXT-G language that comes with the kit. NXT-G is described as a visual language. Instead of being written in text, it is created as a diagram (see Figure 1.1). NXT-G is described in more detail in Chapter 2.

Most of the NXT-G programs in this book are based on the Tribot (Figure 1.2) and the RoboArm, because these are the most versatile robots. Also, there are several programs specially written for Alpha Rex.

What is a Program?

A program is essentially a list of instructions that tells the robot what to do and when and how to do it.

A NXT-G program does not look anything like a list (see Figure 1.3).The program is built up from icons, each icon representing one or more instructions. The icons are arranged in order on a framework. The design of each icon tells us what the icon does (see Figure 1.4). When the program is run, the icons are taken in the order in which they are on the framework, or sequence beam, and executed in that order. This is the same as having a written list of instructions and following them in the order in which they are listed.

Now comes the problem. Humans can understand the icons and sequences of icons, but robots can't. Robots only understand an arrangement of electrical charges in the electronic circuits in their memories. The program in icon form has be turned into electronic form. This is where a compiler program comes in. The compiler program is run by clicking on one of the buttons at the bottom right-hand corner of the screen. When the program has been compiled, it is read and executed by the microcontrollers in the NXT brick.

Designing a Robot

When you have finished building and programming the robots that come with the kit, you will almost certainly want to design and build robots of your own. This is when things get really exciting. When you are designing your own robots, the first question that must be asked is "What do I want it to do?". Do I want it to pick up objects? If so, it will need one or more arms with grippers (see Figure 1.5). Do I want it to move around? If so, it needs to have wheels, or legs, if its environment includes steps or rough surfaces. Does it need an ultrasonic sensor for navigation? Does it need an audio sensor for receiving spoken commands?

By considering these types of questions you build up a specification for the robot that is related to what it has to do and where it has to operate.

Specify the Robot's Environment

Animals (including humans) adapt to the environment in which they live. It is different with robots. Sometimes it makes things simpler if we adapt the environment to the robot instead of adapting the robot to the environment. One example is if the robot is designed to find its way to a source of light, it's a good idea to make sure there is only one source of light in the room. Later you can try to get it to distinguish between one bright source of light and other sources of light. Give it a simple environment to start with, and when the program is working properly you can try improving it to work in a more complex environment. Start with something easy and progress to something more difficult.

In the case of a robot that handles objects, it may be a good idea for the objects to be all the same size and shape. Later you can try programming the robot to handle objects of different sizes and shapes. If the robot has to move from one place to another, paint a line on the floor for it to follow. It is much easier for a robot to follow a line, rather than to navigate between the walls and furniture. There are many ways of adapting the environment to simplify the task of the robot.

Intelligent or Smart?

Most of the programs in this book give the robot a pattern of smart behavior. A robot that heads toward a bright source of light while avoiding obstacles may be smart, but can hardly be called intelligent. It is interesting to compare the NXT brick with the brain of a very simple animal such as the flatworm. This animal can solve a simple T-maze (see Figure 1.6) by trial and error. The experimenter put the worm at the base of the T. In the early trials the worm found its way to the food by chance, sometimes going left and sometimes going right. After the trial was repeated several times, it gradually learned that going left would take it to the food. From then on it always went to the left. This is one type of intelligent behavior. The animal learned to find where its food was placed. Robots can do the same thing. Later in this book we describe how to program a Mindstorms robot to solve a maze with three or more junctions. At first it operates by trial and error, but when it finds a successful pattern of behavior it remembers it and repeats it as long as it continues to be successful.

Summary

If it is possible to program a robot to solve a maze better than a flatworm, it should be easy to get it to mimic the behavior of other lowly animals. Why not program the Tribot to behave like a bat, using an ultrasonic sensor to steer its way across an obstacle-littered floor in total darkness. One of the programs later in this book shows how a Tribot can be programmed to behave like a housefly, ignoring slow changes in the light intensity, but accelerating rapidly away when the shadow of a swatting hand suddenly A bit further up the intelligence scale, we see how RoboArm can be programmed to perform a magical illusion in the same way that a human magician does. But is this intelligent behavior or just smart? This is for the reader to decide.

Chapter Two

About NXT-G Programs

Introduction

NXT-G is a visual language where instead of writing the program in text, you work with icons that represent self-contained units of program instructions. These units are called programming blocks, or just blocks. You drag the required blocks on to the work area of the screen and arrange them on the sequence beam in the order in which they are to be executed (see Figure 2.1).

When you first open your LEGO Mindstorms kit you are invited to begin by building the Quickstart buggy. This is a mobile vehicle with two drive wheels at the front and a small caster wheel at the rear (see Figure 2.2). The Quickstart has three motors, one for each drive wheel. The third motor is not used until later, when it is used to drive a gripper.

After you have built the Quickstart (or Tribot) it needs to be told what to do and how to behave. In other words, it needs to be programmed.

Creating a Program

As explained above, a NXT-G program appears on the computer screen as a sequence of programming blocks placed in order of execution on a sequence beam. Each block is dragged from the programming palette on the left-hand side of the screen. Clicking on a block (see Figure 2.3) shows its settings in a configuration pane (see Figure 2.4) at the bottom left-hand side of the screen.

The settings are edited to suit the program. When the configuration panel is first displayed the settings are set to their default values. For example, the motor block always sets the motor to run forward. If you want it to run in reverse, you need to click the radio button beside the backward-pointing arrow. For some of the settings you have to enter a value.

Many, but not all, of the settings are indicated by symbols on the block icons, so you can get a good idea of the program by looking at the displayed symbols. In Figure 2.3, for example, we can see that this is a move block because of the double gear wheels and that the motors operate on high power (but not the exact power) and runs for a given time (but not exactly how long). The icon does not show whether the next action is to brake or coast. You have to display the configuration pane (Figure 2.4) to discover the settings in full detail.

If you want a complete record of the program, you can type the comments as well as the blocks, which are saved along with the program. They will help you to remember how the program works if you come back to it a few months later. However, the comments are not incorporated into the compiled program, which is downloaded into the brick.

Comments are added to the screen shots to make the program clearer to you and to show you how to edit the settings.

First Steps

Figure 2.6 shows an example of a NXT program. It is the NXT-G equivalent of the traditional "Hello World" program that is featured in many books on programming. The Quickstart moves forward a short distance, says, "Have a nice day," and then reverses back to its starting point.

The robot performs three different actions, one after the other. This means that the program has three action stages, and therefore consists of three action blocks:

* Move To move the robot forward

* Sound To say "Have a nice day"

* Move To reverse back to the starting position

Create and run the program by following these seven steps:

1. Build the sequence. Use the mouse to drag blocks from the programming palette on the left-hand side of the screen and drop them in order onto the sequence beam. 2. Settings. All settings have their default values except where otherwise indicated. Check or uncheck radio buttons, set sliders, and type values or text into text boxes. 3. Save the file under the file name firstSteps. 4. Compile and download. With the robot connected by USB cable or with Bluetooth switched on, click on the bottom left-hand side controller button. This compiles the program and downloads it into the NXT but does not run it. 5. Prepare to run the program. Disconnect the USB cable if used. Use the buttons on the NXT to navigate to the "Run" instruction. Starting at "My files," press the orange button three times. The screen then displays the file name, firstSteps and the word "Run." Put the robot on the floor, making sure there is at least 1.5 meters of clear space ahead of it. 6. All ready? Press the orange button. After a second or two delay, the robot moves forward, stops, says its party piece, and reverses back to its starting position. Because of the differing power levels in the two move blocks, the robot runs faster when it is returning to its starting position. Press the button again to repeat this star performance.

7. Switching off. When you are satisfied that the robot is behaving according to plan, conserve the power supply by switching it off. Three presses on the dark grey button bring you back to the "Switch off?" screen. Then press the orange button to switch off.

Out of Memory?

You may get the "Out of Memory?" message during the compiling stage. At this stage, you will have to free some memory space before compiling can be completed. Often some of the files you find in memory are no longer needed. When you delete a program file, the files associated with it (e.g., sound files) are not automatically deleted. Sound files take up a lot of memory. For example, the "Have a nice day" file takes 5 kilobytes out of the total 130.7 kilobytes available. Be sure to delete it before going on to compile another program that does not use it.

To manage memory, either click on the "Manage Memory" button in the window that appears during compiling, or click on the top left-hand button of the on-screen controller. In the panel that appears, click on the "Memory" tab. You will see a display of the current memory usage. Select and delete files that are no longer needed.

(Continues...)



Excerpted from Programming Lego Mindstorms NXT by Owen Bishop Copyright © 2008 by Elsevier, Inc.. Excerpted by permission of Syngress Publishing, Inc.. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

1 Robots come alive
2 Talking to your robot
3 How to ?
How to use sensors
How to control motors
How to process data
How to navigate the robot
How to make it intelligent
4 Visual Programming Language
5 Programming projects
10 programs in total.
For the QuickStart vehicle and/or the Tribot:
Maze solver, learning best path.
Use a marker pen to copy a drawing or sketch a picture.
Use a marker pen to write its name.
Play Nim against human opponent and learn to win.

For the Tribot:

Find and pick up a light-colored object; drop it in a dark corner, as a Squirrel might do.
A sort of 'roulette' game for those who like to gamble. Robot takes a randomly chosen path on a board marked with a numbered grid. Stops at random.

For the RoboArm:

Sort a pile of toy building bricks by color (using light sensor or color sensor).
Build a 'house' from toy bricks; then (optionally) knock it down!
Throw a ball into a cup, and learn to improve accuracy.
Play Scissors, Paper, Stone against human opponent and learn to win more often.
Play the Breakaway strategic board game against a human opponent.

For Spike:

Search for light-colored object, avoiding obstacles in its path (example of subsumption architecture.

For Alpha Rex:

Song and Dance Act: repeats if applauded, sulks if not.
Navigate using compass sensor.

Read More Show Less

Customer Reviews

Average Rating 4
( 14 )
Rating Distribution

5 Star

(9)

4 Star

(1)

3 Star

(1)

2 Star

(0)

1 Star

(3)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 14 Customer Reviews
  • Anonymous

    Posted November 29, 2011

    It was OK

    The book was a little to complicated.

    2 out of 2 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 17, 2012

    Read NOW!

    Did you hear about the school shooting in conneticuit? Please reply back!

    1 out of 2 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted March 23, 2012

    Cool

    LEGOs rock

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted October 6, 2014

    Join a lego chima rp at teel result one

    Join now

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 3, 2014

    Ryan O'Donnell

    Hey guys if you play minecraft on i-pad i can tell you a cheat it is typed in seed now on to the cheat it is 0,1,0

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted November 27, 2013

    P

    P

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted April 3, 2013

    Treasure hunt to sonic

    Go to extreme makeover result 2

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 20, 2013

    The second half of: samuri and the search clue

    The clue hunt members also should be careful to find the hunt end points: one in sonic and the other is unknown so you arent done until you FIND ALL THREE ENDINGS!

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 1, 2013

    To "READ NOW"

    Ya that was sad

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 27, 2012

    G

    G

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 6, 2012

    Grose

    The book is bull crap

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 7, 2012

    Wisuieeididkidsjkadjjjekjdjedkerkjedjdjejejejdjejejjjdjwjd

    Skdfdfw

    0 out of 2 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted May 29, 2011

    No text was provided for this review.

  • Anonymous

    Posted November 21, 2010

    No text was provided for this review.

Sort by: Showing all of 14 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)