Fun Projects for your LEGO MINDSTORMS NXT!

Home     Projects     Help     Contacts

Hammer Car
Building: Advanced
Program: Expert

Building Instructions


Start by building the 2-Button Remote Control with the 3-Motor Chassis.  Click the picture for building instructions.

Building Instructions






Hammer Car Programming

Use the HammerCar program to control the Hammer Car with the 2-button remote control.  The controls operate as follows:

Press and hold left button: Turn left
Press and hold right button: Turn right
Press and hold both buttons: Go straight forward
Briefly press left button: Make laughing sound
Briefly press right button: Swing hammer down and up

The HammerCar program is a complex extension of the 2TouchDrive program (which is itself an extension of the simpler 2TouchRemote program), which adds the a way to control the hammer and make the sound.  Before trying to understand the HammerCar program program, study these two simpler programs first.

In order to tell the difference between a button being briefly pressed and the same button being held down, the HammerCar program uses timers to keep track of how long the two buttons are held down.  Then three parallel block sequences are used to carefully track the state of the two buttons and perform the desired actions. 


  • 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.

  • Can you think of some modifications to make to the hammer, or maybe think of something else to use the third motor for in a similar project?


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.