Joystick Tablet

The goal of this example is to demonstrate how to use joystick axes to control the cursor using a Virtual Mouse. This assumes that the reader is familiar with the basics of creating Building Blocks as shown in the Detailed Tutorial.

This example will use the left thumbstick on the Logitech RumblePad 2 to control a virtual tablet.

The first step is to create a new virtual tablet.

Right-click in the list of Programming Items and select Create Virtual Device ‣ Virtual Tablet.

In the COORDINATES section, verify that the coordinates are equal to the size of the main screen.

Next, create a programming Page named "Joystick Tablet". Disable the "Joystick Tablet" page to prevent the building blocks that are about to be added from controlling the virtual tablet immediately.

On the "Joystick Tablet" page, create Axis building blocks for the X-Axis and Y-Axis on the RumblePad 2.

Connect an Axis Calibration building block to each Axis building block.

Connect a Virtual Axis building block for the X-Axis of the virtual tablet to the Axis Calibration block for the X-Axis on the RumblePad 2. Similarly, connect a Virtual Axis building block for the Y-Axis of the virtual tablet to the Axis Calibration block for the Y-Axis on the RumblePad 2.

Move the left thumbstick on the RumblePad 2 to determine the minimum and maximum values that its axes generate. Set the Min and Max values of each Axis Calibration block's Expected input range values that the attached axis generates.

In the Axis Calibration block that is connected to the X-Axis, set the Min and Max values of the Calibrated output range to the "Left" and "Right" coordinates of the virtual tablet respectively. In the block that is connected to the Y-Axis, set the Min and Max values to the "Top" and "Bottom" coordinates of the virtual tablet respectively.

Set the Center Value of each Axis Calibration block to the value that each axis generates when it is not being pushed.

Disable the Deadband value of each Axis Calibration block.

Next, create a second programming page name "Control". This page will contain building blocks that enable and disable the "Virtual Tablet" page.

On the "Control" page, create a Button building block for Button #5 on the RumblePad 2.

Create a Properties building block for the "Joystick Tablet" page and connect it to the Button building block. The easiest way to create a pre-configured Properties block is to drag an item from the list of Programming Items in the Editor window onto the page's grid.


At this point, the RumblePad 2 can be used to control the axes and buttons of the virtual tablet while Button #5 is pressed. When Button #5 is released, the RumblePad 2 will not affect the cursor.