Keyboard Driving
Download the Keyboard drive robofile.
- This demo allows you to steer the Roomba using the cursor keys on your keyboard while holding down the CTRL key. This works best with the Roomba connected to an
off robot computer (like your desktop) with a long serial cable attaching the PC to the robot. If you have an onboard Netbook you will
find that as soon as the robot moves you will not be able to keep holding down the cursor key!
- First double click on the
Roomba module in the processing pipeline and change the serial COM port
to the one you are using. Note that if you happen to have a serial port on your Netbook then the COM port will most likely be from COM1 to COM4. If you are using
a USB to serial converter then it can be a much higher number. RoboRealm will only display those COM ports that are active within the system
so the COM port selection should be limited to only a few selections. If you are not sure on which COM port is being used start with the highest one and
test while moving to lower ones.
- You should now be able to hold down the Ctrl key and use the cursor keys to move the robot. While holding down the Ctrl key, use cursor left and cursor right to pivot left or right. Use
the cursor up and down keys to move the robot forward and backward.
- You can change which keys cause which movement (or add other keys to move at different speeds) by double clicking
on the Keyboard_Read module in the pipeline. Once that interface appears you can click on each of the line
items that specify the keys in use to modify them to other keys. If you want to add keys, select an existing key
and press Add which will create a new entry.
- Note how the change of the left and right motor variables in the keyboard module is passed to the Roomba module as specified in the Motor Variable area of the Roomba GUI configuration screen. Thus this variable can be changed based on different input and still cause the same reaction in the robot. The concept of variables offers a cross-point between different input and output devices.