Sei sulla pagina 1di 29

7/17/2016

NXT Claw Car with Game Controller

Fun Projects for your LEGO MINDSTORMS NXT!


Home

Projects

Help

Contacts

Claw Car with Game Controller

Building:
Program:

Building Instructions

Note: This is an expert-level project. If you are new to building with the NXT kit, or
new to the nxtprograms.com web site, you might want to try some of the easier
projects first.

1-23
Start by building the Car with Game Controller project (using the Castor Bot). Click the picture for building
instructions.

24
This project needs the NXT brick pointing the opposite way from the Castor Bot project, so in this step you
need to remove the NXT brick, turn it around, then re-attach it. To do this:
http://www.nxtprograms.com/claw_car/steps.html

1/29

7/17/2016

NXT Claw Car with Game Controller

1. Remove the two motor wires, and detach the two sensor wires from the NXT brick.

2. Carefully remove the NXT brick from the chassis of the Castor Bot. It is attached by two straight white
beams and two angled gray beams on the sides, and four pegs on the bottom. You can either remove
the side beams, or carefully pop them out of the NXT brick and bend them slightly outwards to get the
NXT out.

3. Make sure that the all the black pegs end up on the beams of the chassis and none on the NXT brick.
If they stick to the NXT, take them out and put them back on the chassis beams.

http://www.nxtprograms.com/claw_car/steps.html

2/29

7/17/2016

NXT Claw Car with Game Controller

3. Re-attach the NXT brick in the opposite direction. Get the four bottom pegs plugged in first, then
attach the four side beams.

4. Leave the wires unattached for now.

25

http://www.nxtprograms.com/claw_car/steps.html

3/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

4/29

7/17/2016

NXT Claw Car with Game Controller

26

http://www.nxtprograms.com/claw_car/steps.html

5/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

6/29

7/17/2016

NXT Claw Car with Game Controller

27

http://www.nxtprograms.com/claw_car/steps.html

7/29

7/17/2016

NXT Claw Car with Game Controller

Note: When attaching the second claw to the motor, you will need to rotate the small gray axle slightly until
it lines up with the cross hole on the other claw.

http://www.nxtprograms.com/claw_car/steps.html

8/29

7/17/2016

NXT Claw Car with Game Controller

28

http://www.nxtprograms.com/claw_car/steps.html

9/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

10/29

7/17/2016

NXT Claw Car with Game Controller

29

http://www.nxtprograms.com/claw_car/steps.html

11/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

12/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

13/29

7/17/2016

NXT Claw Car with Game Controller

30

31

http://www.nxtprograms.com/claw_car/steps.html

14/29

7/17/2016

NXT Claw Car with Game Controller

Important: Make sure both sides of the claw are open all the way before putting the gears on. This will
ensure that the claw will open and close symmetrically.

32
http://www.nxtprograms.com/claw_car/steps.html

15/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

16/29

7/17/2016

NXT Claw Car with Game Controller

Important: Make sure both sides of the claw are still open all the way before putting on the L-shaped beam.

http://www.nxtprograms.com/claw_car/steps.html

17/29

7/17/2016

NXT Claw Car with Game Controller

33

http://www.nxtprograms.com/claw_car/steps.html

18/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

19/29

7/17/2016

NXT Claw Car with Game Controller

34

http://www.nxtprograms.com/claw_car/steps.html

20/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

21/29

7/17/2016

NXT Claw Car with Game Controller

Attach the claw to the bottom of the robot as shown below. There are five black pegs that need to go in.
http://www.nxtprograms.com/claw_car/steps.html

22/29

7/17/2016

NXT Claw Car with Game Controller

Attach the claw to the bottom of the robot as shown below. There are five black pegs that need to go in.

This is what it should look like from the top when the claw is properly attached.

http://www.nxtprograms.com/claw_car/steps.html

23/29

7/17/2016

NXT Claw Car with Game Controller

35

http://www.nxtprograms.com/claw_car/steps.html

24/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

25/29

7/17/2016

NXT Claw Car with Game Controller

36
Re-attach the two motor wires. Looking at the NXT brick right-side-up, the left motor should attach to port
B on the NXT, and the right wire should attach to port C on the NXT. You can route the wires under the
chassis side beam to keep them out of the way, as shown below.

37
Use the shortest wire to attach the claw motor to port A on the NXT brick. You can route the wire under
the round chassis cross support to keep it off the ground, as shown below.

http://www.nxtprograms.com/claw_car/steps.html

26/29

7/17/2016

http://www.nxtprograms.com/claw_car/steps.html

NXT Claw Car with Game Controller

27/29

7/17/2016

NXT Claw Car with Game Controller

38
Reattach the two controller wires to the NXT brick, making sure that the light sensor wire goes to port 3 on
the NXT and the the touch sensor wire goes to port 4 on the NXT.

Claw Car with Game Controller Programming


Use the program Claw Control for the Claw Car with Game Controller. This program is based on the
Game_Control program that is used for the Car with Game Controller project and then adds a way to open
and close the claw using the touch sensor. The controller must be calibrated before it can be used, so the
program starts with a calibration sequence. See the instructions below for details.

Using the Controller for the Claw Car


The remote control for this project is based on the controller used for the Car with Game Controller project.
The control must be calibrated before you can drive with it. See the instructions for Using the Game
Controller to learn how to calibrate the control and drive the robot using it.
The Claw Control program for this project adds a way to open and close the claw using the touch sensor on
the control. But the touch sensor is also used to tell the robot to drive forward, so a little trick is needed to
tell the difference between the two:
When the touch sensor button is pressed and held down, the robot will drive forward (and the left
thumb plate will steer the robot left and right while it is driving).
When the touch sensor is pressed briefly and then quickly released ("Clicked"), the claw will open if it is
closed or close if it is open.
Because of this trick, there is a slight delay before the robot will drive forward when you press the touch
sensor, while the program is waiting to see if you release the button soon enough or not. This same trick is
often used in the graphical user interface of desktop computer programs to tell the difference between a
"click" and a "drag" of the mouse.

Challenges
http://www.nxtprograms.com/claw_car/steps.html

28/29

7/17/2016

NXT Claw Car with Game Controller

Practice driving and using the claw with the remote control, then see if you can drive up to a plastic
NXT ball, grab it, take it somewhere else, and then let it go. There is no way to back up with the
Claw Control program, so you can just pull back on the controller wires when you need to back up.
The claw will grab and hold lots of other things besides balls. See what other kinds of things you can
grab, hold, and drive with.
For an advanced programming challenge, see if you can understand enough of the Claw Control
program to modify it to control something else that you build. See the Challenges section at the end
of the Car with Game Controller Project for hints on how to get started, because the Claw Control
program is based on the Game_Control program. In addition to the six "BC" Move blocks for the
driving, the Claw Control program adds three "A" Move blocks to open and close the claw (one is just
to force it open at the beginning of the program).

Get nxtprograms.com on CD!


Click here for info

Home

Projects

Help

Contacts

C opyright 2007-2011 by Dave Park e r. All rights re se rve d.


All proje ct de signs, im age s, and program s are prote cte d by copyright. Ple ase se e the usage policy.

http://www.nxtprograms.com/claw_car/steps.html

29/29

Potrebbero piacerti anche