Fun Projects for your LEGO® MINDSTORMS® NXT! |
1-Button Remote Control |
|
1-11
Start by building the Castor Bot. Click the picture for building instructions.
12
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:
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. |
Challenges
|
|
Copyright
©
2007-2011 by Dave Parker. All rights reserved. |