Controlling IR devices from Roborealm

One of the latest exciting additions to the Roborealm software is the inclusion of a driver for the USB-UIRT. This device is a USB based programmable IR emitter. You can use it in conjunction with roborealm to quickly and easily control a variety of consumer grade robots and toys. In this tutorial I will show you how to control your ISOBOT robot with Roborealm.

The requirements for this tutorial are:

  • Roborealm software available here.

  • USB-UIRT hardware ($50)

  • TOMY ISOBOT ($100)

  • Webcam (optional)

  • PC Joystick


  • First we will look at using a joystick on your PC to control the ISOBOT. The Basics: Be sure to download roborealm from www.roborealm.com.   It is a free download and will install into a folder which you can copy to your program files. 
     Open up the roborealm software and select Interface -> Joystick.  You should see a window that looks like the one on the below.  

    For our purposes, we will use the joypad to control the ISOBOT.  I notice that by moving the joypad, the values in the View Switch box change.  I will define a vara\aible called “joypad” by typing that into the drop down box under viewswitch.  This variable will change as I move the joypad. I notice that in my case joypad takes the following values:
    1. Forward    0
    2. Right        9000
    3. Backward 18000
    4. Left          27000
    I will use these values to control the ISOBOT.  Now go ahead and close the joystick mapper by selecting OK.
    Next we need to setup the USB-UIRT Device.  Select Control -> Other -> USB_HID.  When you double click on the item you should see the window below:

    To start off we will just define four basic actions for the robot:
    • Move Forward (Corresponding to pushing forward on the ISOBOT remote)
    • Turn Right (Corresponding to pressing diagonally Right on the remote)
    • Turn Left (Corresponding to pressing diagonally Left on the remote)
    • Move Backward (Corresponding to pulling backward on the remote)
    We will need to complete the following four steps to program the USB-UIRT with a command for the ISOBOT.

    1.   First we need to give the command a name and then learn the command.  In the dialog box type in a name for the command.(Such as forward)  Then press the LEARN Button. 
    2.  When you press the A dialog will pop up.  Point the ISOBOT remote at the USBUIRT.  Press and hold the stick forward until the light on the USBUIRT blinks three times and the dialog disappears.  You should now see a code in the IR Code window.  You can test this code by turning on your ISOBOT and pressing the test Transmit button.  If everything is working correctly, your ISOBOT should move forward when the Test Transmit button is pressed. 

    3. Now we need to attach the command you just learned to the joystick.  In the variable dropdown box, select the variable that you created in the Joystick dialog (joypad).  Since we know that the joypad is going forward when it has a value of 9000, we will select Set and then Equal in the next box.  In the last box we will select a value of 9000.  Now click the New button on the right hand side, and your actions will be saved.  You may choose to have the USB-UIRT light up on transmitting and the number of repetitions.  If you are having trouble, you might try decreasing the number of repetitions to prevent interference between subsequent repetitions. 
    4. Now you need to repeat this process for each of the four signals that you might be interested in.  


    Now play with your robot!  You can watch a movie of my ISOBOT running around under Computer Control below.  I show the joystick briefly during the video.
    You might want to try the path planning tutorial using your new Roborealm controlled ISOBOT!

    No comments:

    Post a Comment