Fun Projects for your LEGO MINDSTORMS NXT!

Home     Projects     Help     Contacts

1-Button Remote Control
Building: Advanced
Program: Easy

Building Instructions


Start by building the Castor Bot.  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.

1-Button Remote Control Programming

Use the program 1-Button_Remote for your 1 button remote control.  This program shows an easy way to have a single button control do more than one thing by cycling through the different functions.  It also shows how you can use a touch sensor to control how long something happens by waiting for the press to start it and then waiting for the release to stop it.


Using the 1-Button Remote Control

The 1-Button_Remote program cycles between three actions each time the button is pressed:

  1. Go straight while the touch sensor is held down

  2. Pivot turn to the left while the touch sensor is held down

  3. Pivot turn to the right while the touch sensor is held down

After doing each of these three in sequence, it goes back to the beginning and repeats them over and over.  Before each of the motions, the NXT display will show a hand pointing in the direction that the robot will go during the next sequence.

Although the program always does the three moves in the sequence shown above, you can actually choose your direction while driving by quickly pressing the touch sensor and releasing it right away, one or more times, to cycle through the directions until the one you want is shown on the display, then press and hold the button to drive or turn in that direction.


  • Practice driving your robot with the remote control and see if you can get it to go where you want.

  • Try using the 1-Button_Remote program to control one of your own robots, modifying it if necessary.

  • Try adding on to the 1-Button_Remote program to add even more functions, like going in reverse perhaps?

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.