nxtprograms.com

Fun Projects for your LEGO® MINDSTORMS® NXT!

Home     Projects     Help     Contacts

2-Button Remote Control
Building: Advanced
Program: Intermediate

Building Instructions


1-14

Start by building a robot with two motor drive such as the 3-Motor Chassis.  
Click the picture for building instructions.

Building Instructions


15

Connect the two touch sensors to ports 1 and 2 on the NXT, so that the left sensor is on port 1.


2-Button Remote Control Programming

The 2TouchRemote program (Intermediate) provides a basic remote control strategy for driving a vehicle with two buttons.  Pressing the left button makes the robot turn left, pressing the right button makes it turn right, and pressing both buttons will go straight forward.

The 2TouchDrive program (Advanced) is a more complex version of a driving program which causes the robot to gradually "ramp up" the power during each motion (straight or turning).  This makes the driving smoother and can make it easier to align the robot accurately.

 

Challenges
  • Practice driving a robot with the 2-Button Remote Control, then set up some targets and see if you can drive your robot accurately to the targets.

  • Try using the 2-Button Remote Control to control another robot of your own creation.  You may need to modify the Move and Motor blocks in the program if the robot goes the wrong direction.

  • Try modifying the 2TouchRemote program to make the robot go in reverse instead of stopping when both buttons are released.  This is more challenging to drive, but can be more maneuverable with some practice.  You can also experiment with other driving strategies.  For example, another reasonable choice is:

Left button pressed: Turn left
Right button pressed: Turn right
Neither button pressed: Go straight forward
Both buttons pressed: Go in reverse
  • Try using the 2-Button Remote Control to control something else that is not a vehicle.  You can control anything that has four different actions, corresponding to the four possible states of the two touch sensors in the table above.

 

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.