------------------------------------------------------------------------------- Dr. Vegetable's Virtual Remote Copyright (c) 2003 by Christopher Phillips All Rights Reserved ------------------------------------------------------------------------------- LEGO(R) AND MINDSTORMS(TM) ARE TRADEMARKS OF THE LEGO GROUP OF COMPANIES, WHICH DOES NOT SUPPORT, AUTHORIZE, OR ENDORSE THIS SOFTWARE PACKAGE. THIS PROGRAM RELIES ON UNDOCUMENTED FEATURES OF THE LEGO MINDSTORMS HARDWARE, AND WHILE THE AUTHOR HAS TAKEN EVERY REASONABLE STEP TO ENSURE THE QUALITY OF THIS SOFTWARE, IT COULD DAMAGE YOUR TOYS OR COMPUTER EQUIPMENT. THIS SOFTWARE IS DISTRIBUTED AS-IS, AND THE AUTHOR MAKES NO WARRANTIES TO THE USEABILITY OF THIS PROGRAM. BY USING THIS PROGRAM, YOU AGREE TO ACCEPT ALL RESPONSIBILITY FOR ANY CONSEQUENCES THAT MAY RESULT. THIS PROGRAM IS PROVIDED TO YOU AT NO CHARGE FOR YOUR PERSONAL, NON-COMMERCIAL USE. YOU MAY USE THIS PROGRAM ON ONE OR MORE COMPUTERS, BUT YOU MAY NOT REDISTRIBUTE THIS PROGRAM TO ANY OTHER PARTY WITHOUT THE PRIOR WRITTEN CONSENT OF THE PROGRAM'S AUTHOR AND COPYRIGHT HOLDER. ------------------------------------------------------------------------------- INTRODUCTION Dr. Vegetable's Virtual Remote is a Windows program that emulates the functions of the hand-held LEGO MindStorms infrared remote control. You must have a LEGO MindStorms infrared communications tower connected to a COM or USB port of your computer in order for this program to work. Other than the driver for the USB tower (if applicable), this program does not depend on any other software being installed, beyond a normal Windows 95 or newer operating system. You must also have the factory firmware loaded into your RCX before it will recognize and respond to the commands in this protocol. You may need to reload the firmware after you change the batteries in the RCX. Consult the documentation that came with your Robotics Invention System for information about how to initialize the RCX firmware. ------------------------------------------------------------------------------- INSTALLATION Installation is simple. Just unzip the contents of the distribution file, VRemote100.zip, into any convenient location on your computer's hard drive. You may wish to create a new directory to contain these files. The new installation will contain the following files: VRemote.exe The Virtual Remote utility program. VRemote.txt This "ReadMe" information file. You are now ready to begin using the Virtual Remote immediately. Simply execute the VRemote.exe program to get started. ------------------------------------------------------------------------------- USING THE VIRTUAL REMOTE PROGRAM Before the Virtual Remote can command your RCX, you must tell the program which port the infrared tower is connected to. On the pull-down Options menu, select the desired COM or USB port. A checkbox will appear beside the name of the port that is currently in use. The program will remember all of your configuration settings until you explicitly change them again. The program displays the same sixteen command buttons that are available on the MindStorms remote. These buttons can send one-byte commands to the RCX, run the three motors in either direction, start one of the five programs, cause the RCX to make a quick "beep-beep" sound, and even stop all RCX activity. The program sends the same infrared command byte sequences that the hand-held remote would. The following sixteen function buttons are available: "1" Send 1-byte message #1 to the RCX. "2" Send 1-byte message #2 to the RCX. "3" Send 1-byte message #3 to the RCX. "a" Run motor A forward "s" Run motor B forward "d" Run motor C forward "z" Run motor A reverse "x" Run motor B reverse "c" Run motor C reverse "F1" Run program #1 in the RCX "F2" Run program #2 in the RCX "F3" Run program #3 in the RCX "F4" Run program #4 in the RCX "F5" Run program #5 in the RCX "space" Stop the RCX program and all motors ("escape" also does this) "enter" Cause the RCX to beep twice You can left+click any button on the screen to send the corresponding RCX command immediately. When you release the mouse button, the remote button will also be raised and the command will terminate. If you instead right+click a button, its on/off state will be toggled and held in that state. This can be used to simulate the effect of holding a button down with your finger for an extended period of time. Each button is labeled with the name of a key on the computer keyboard. You may press and hold any button on the remote by pressing and holding the corresponding key. Please note that many keyboards have difficulty recognizing new keypresses when nearby keys are being held down. One feature that bears special mention is the Automatic Buttons command on the Options menu. This feature, when enabled, automatically un-presses any buttons that conflict with the purpose of a newly-pressed button on the remote. This prevents the Virtual Remote from sending contradictory commands like telling a motor to rotate in both directions at the same time or telling the RCX to run two or more different programs at once. When the Automatic Buttons feature is disabled (ie: not checked on the Options menu) there is no restriction on which combination of buttons may be pressed at any one time. This is how the actual LEGO remote works, and is supported to provide full compatibility with the original. Please note that some computer keyboards do not recognize a keypress in certain circumstances when a nearby key is already being held down. This may cause some of the remote buttons to appear unresponsive to the touch. If you need to hold down many buttons for a long time, try using right mouse clicks to toggle the button states instead of going directly through the keyboard. The commands sent by the remote will be carried out by any RCX within range of the infrared. The RCX may even be running a program when you use the remote. If you use the motor buttons, you will temporarily override the motor speeds of any program that may be running at the time. As soon as you release the motor buttons, the motors will resume their normal, programmed operation. ------------------------------------------------------------------------------- TROUBLESHOOTING AND SUPPORT If this program does not seem to work, please check the following things: 1. Make sure no other program is running (including another copy of Virtual Remote) that might be using the tower. 2. If you are using a USB tower, you MUST install the tower driver from the LEGO RIS 2.0 CD before you physically connect it to the computer! 3. If you are using an RS-232 tower, make sure it contains a fresh 9V battery. 4. The tower must be connected to the port that is checked on the Options menu. You should see the green LED in the tower light up when you press one or more buttons on the Virtual Remote. 5. Make sure your RCX is turned on and within range of the IR tower. You will probably want to configure the tower for long-range power. The USB tower range can be set when you install the driver; the RS-232 tower range is set using a switch on the front of the tower. 6. Make sure the RCX has had the factory firmware loaded into it since its last battery change. The RCX will not recognize the IR remote commands until the factory firmware file has been downloaded. If everything is working properly, the tower should light up when you press a button, and pressing the beep/Enter button should cause the RCX to emit a quick "beep-beep" sound. Otherwise check all settings above. If you still have problems with this program, please check for any program updates at http://www.drvegetable.com. If you still cannot resolve your problem or think that you have found a bug, you may contact the author with any comments, questions, or suggestions: Christopher Phillips P.O. Box 544 Walpole, MA 02081 drvegetable@attbi.com I cannot promise to personally respond to all inquiries, but I will try to address any problems with this software that are brought to my attention. Enjoy! - Dr. Vegetable. -------------------------------------------------------------------------------