Fun Projects for your LEGO MINDSTORMS NXT!

Home     Projects     Help     Contacts

Hammer Car
Building: Advanced
Program: Advanced

Building Instructions


Start by building the 3-Motor Chassis.  Click the picture for building instructions.

Building Instructions









Use one of the longest wires to connect the touch sensor to port 1 on the NXT.

Hammer Car Programming

The Hammer_Car program will allow you to operate the Hammer Car with the single button remote control.  See the instructions below.

How to Control the Hammer Car

The Hammer_Car program uses a simple timing technique in order to tell the difference between the touch sensor being quickly pressed and then released, and the touch sensor being held down.  Whenever it sees a quick press and release, the robot will swing the hammer down and then back up.  Whenever it sees the button being held down, it will cycle between the following four driving actions:

  1. Go straight until the button is released.

  2. Pivot turn to the left until the button is released.

  3. Go straight again until the button is released.

  4. Pivot turn to the right until the button is released.

Before each driving action, a pointing hand graphic will be displayed on the NXT screen to show which way the Hammer Car will go next.  With a little practice, you will be able to drive and turn to get where you want, then swing the hammer when you want.


  • Practice driving the Hammer Car, then set up some small targets and see if you can drive your Hammer Car to the targets and hit them with the hammer.

  • Try programming the Hammer Car to drive to a target and hit it by itself without the remote control.

  • Try building and programming another kind of remote control for the Hammer Car.  For example, if you have enough parts to build the game controller from the Car with Game Controller project (or something similar), try using that remote control and then modifying the claw part of the Claw Control program from the Claw Car with Game Controller project to control the Hammer Car.

  • The Hammer Car has a sturdy 3-motor chassis that you could use to make other robots.  Can you think of something else to use the third motor for instead of the hammer?

Get nxtprograms.com on CD!
Click here for info

Home     Projects     Help     Contacts


Copyright 2007-2011 by Dave Parker.  All rights reserved. 
All project designs, images, and programs are protected by copyright.  Please see the usage policy.