Screenshot of LEGO Mindstorms NXT 2.0 software by Wally Bahny for TechRepublic
The last addition to the Shooterbot requires the addition of the Ultrasonic sensor, which is attached next to the ball clip. This slide shows the programming required to make the Shooterbot detect a nearby object, change the lamp to blue, warn that it will fire, change the lamp to red, and then fire two balls in quick succession.
Watch a short video of the Shooterbot in action.
Screenshot of LEGO Mindstorms NXT 2.0 software by Wally Bahny for TechRepublic
Robogator is the next project included on the CD-ROM. This is a picture of the Robogator at the end of the first phase of construction. This bot is able to detect a nearby object and then start snapping its jaws.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
The next phase is the powered back legs. Although the legs have not been attached to the body of the Robogator yet, this is a great up-close shot of the leg construction.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
The last step in that phase is attaching the legs to the body as shown.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
The final Robogator with a tail and touch sensors to detect where the legs are rotationally.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
This slide contains most of the programming for the Robogator. Here you can see two independent programming paths: one for the legs and one for the jaws. The legs are programmed to start in their “normal position” by rotating until they find it, if necessary. Then, the Robogator waits until an object is within a certain distance from its “eyes.” Once it “sees” an object, it lunges a couple of times and then “runs,” alternating each leg. The jaws are also programmed to detect a nearby object and then begin snapping, which will continue until the object moves away.
Watch a short video of the Robogator in action.
Screenshot of LEGO Mindstorms NXT 2.0 software by Wally Bahny for TechRepublic
The first construction phase of the next model, the Color Sorter, dumps one ball at a time out of the holding area; this is accomplished by a gear and piston shaft visible near the center of the photo. The piston rises, pushing the holding area up at an angle and allowing a ball to roll onto the output chute.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
The next phase adds the Color sensor, which enables the Sorter to announce which color ball it will drop.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
This is one of the two final phases of the Color Sorter. In this model, the ball color is announced as it passes under the Color sensor. The Sorter knows which bin to put each color in and rotates the bins accordingly using the motor nearest the camera, which is attached to a drive shaft that passes underneath the machine and up into the bins.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
This is a large segment of the Color Sorter version 1 code. In this code, motor C (the one powering the holding area) is turned to make a ball fall under the Color sensor. Depending on the color, the bins are rotated (motor B) until the appropriate bin is underneath the output chute, at which time the ball is dropped. This is repeated indefinitely until the user presses the gray button.
Screenshot of LEGO Mindstorms NXT 2.0 software by Wally Bahny for TechRepublic
The second of the two Color Sorter models, this one is more of a “Color Catapult.” Instead of placing the balls into bins, this model launches them in different directions, depending on the color of the ball.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
This code is slightly different than the first version. In this code, the color is not announced until the ball is in the catapult, at which time it is rotated to a certain angle and fired.
Watch a short video of the Color Sorter in action.
Screenshot of LEGO Mindstorms NXT 2.0 software by Wally Bahny for TechRepublic
Alpha Rex is the fourth model included on the CD-ROM. In this initial phase, the robot is already able to walk using specially constructed legs and feet that change their angle against the floor at the same time they move forward and backward, which create footsteps.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
Phase two of Alpha Rex adds arms, complete with grabber hands and shoulder pads. The tendon-like pieces running from the neck to the shoulders, as well as from the shoulders to the forearms, enable the hands to automatically open and close. A motor strapped to the robot’s back powers the side-to-side movement with a rotating arm that can be seen next to the robot’s left shoulder.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
Next comes the Alpha Rex’s head. With the built-in “eyes,” this makes Alpha Rex look almost human. The Ultrasonic sensor allows Rex to react to objects in front of it.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
Finally, we add the Color sensor on its right hand, which enables it to detect which color ball is placed in his hand when he asks for it.
Photo of LEGO Mindstorms NXT 2.0 by Wally Bahny for TechRepublic
This is a very small segment of code that sets up Alpha Rex’s movement and reactions. In this segment, you can see the two sound tiles separated by a 0.5 second wait tile. This is where it says “Green Please” and then waits for a ball to be placed in its hands. Depending on the color, Alpha Rex will either drop the ball where he stands (red, yellow, or blue) or walk forward several steps before dropping the ball (green). Watch a short video of the Alpha Rex in action.
Read my Geek Gifts 2010 review of LEGO Mindstorms NXT 2.0.
Screenshot of LEGO Mindstorms NXT 2.0 software by Wally Bahny for TechRepublic