Thumbnail

Joystick (Direct Input)

DirectInput joystick control for ARC: drive movement panels, control servos, assign button scripts, variable speed and rumble feedback.

How to add the Joystick (Direct Input) robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Remote Control category tab.
  5. Press the Joystick (Direct Input) icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Joystick (Direct Input) robot skill.


How to use the Joystick (Direct Input) robot skill

ARC can read multiple joystick parts:

  • Analog sticks (left and right)
  • D‑Pad (digital up/down/left/right)
  • Triggers (often treated like an additional “joystick” axis)
  • Buttons (A/B/X/Y, bumpers, start/back, etc.)

Main Window

Joystick (Direct Input) main window annotated

1) Device Drop-down

Shows all DirectInput controllers detected by Windows that ARC can use with this skill. Select the controller you want to use (helpful if you have more than one device connected).

2) Refresh Button

Re-scans Windows for controllers. Use this when:
  • You plugged in a USB controller
  • You paired a Bluetooth controller
  • You turned on a wireless controller after ARC started

3) Status Field

Shows whether the skill is connected to your selected controller. If you are not connected, re-check the device selection and press Refresh.

Quick Start (Beginner Steps)

  1. In ARC, add the skill: ProjectAdd SkillMiscJoystick (Direct Input).
  2. Connect your controller to your PC (USB wireless dongle, USB cable, or Bluetooth pairing).
  3. Open the skill and select your controller from the Device drop-down.
  4. If you don’t see it, click Refresh, then select it again.
  5. Confirm the Status shows connected, then click Settings to choose what the sticks/buttons should do.

Settings: Joystick #1 Tab (Usually the Left Stick)

Joystick #1 settings tab annotated

Turn this ON if you want the left stick to drive your robot using the active Movement Panel in ARC.

  • By default, the D‑Pad has scripts assigned to call: forward(), reverse(), left(), right(), and stop().
  • The D‑Pad is digital (on/off). If you want smoother control, enable stick-based movement and (optionally) variable speed below.

This section is available when Joystick #1 Controls Movement Panel is OFF. Use it to make the stick move servos (example: head pan/tilt, arm, camera mount).

  • Servo Port: which servo output number to move (example: D0, D1, etc. depends on your controller/board).
  • Board Index: which connected servo controller to use if you have more than one.
  • Servo Configuration: which ARC servo config entry to use (lets you re-use limits/center settings).
  • Min/Max limits: prevents the servo from going beyond safe angles.
  • Multiple servo control: useful if you want one stick axis to move more than one servo together.
  • Invert: flips the direction if “left” moves the wrong way.
Tip: If the servo moves backward, use Invert rather than rewiring.

Only available when the left stick is controlling a Movement Panel. When enabled, ARC uses the analog stick amount (how far you push it) to request slower or faster movement. This only works if your chosen Movement Panel supports variable speed.

Only available when controlling a Movement Panel. This sets the minimum stick movement before ARC considers it “intentional”.

  • Joystick values range from -1 to 1.
  • Default is 0.25 (you must move past 0.25 before it moves).
  • Increase it if your robot “creeps” when you aren’t touching the stick.
  • Decrease it if you want very light stick movements to respond.

Settings: Joystick #2 Tab (Usually the Right Stick)

Joystick #2 settings tab annotated

1) “Joystick #2 Controls Drone Up/Down/Roll”

Turn this on if you are controlling an A.R. Drone Movement Panel and want the right stick to control drone motion (up/down/roll). If you are not using a drone, leave this unchecked and use the stick for servos instead.

2) Servo Control (when NOT controlling the drone)

When the drone option is unchecked, you can assign the right stick axes to servos. Configure port, board index, limits, inversion, and multi-servo control the same way as Joystick #1.

Settings: Joystick #3 Tab (Triggers)

Joystick #3 settings tab annotated

Trigger Servo Control

Many controllers expose the left and right triggers as analog inputs. This tab can map triggers to servos.

  • If you do not want triggers to move servos, simply don’t configure servo control here.
  • You can then use triggers for other logic (for example: scripts, variables, rumble control).

Settings: Buttons Tab (Run Scripts on Press/Release)

Buttons tab annotated

1) Button Number

Button numbering can differ between controller brands/drivers. ARC lists them as generic numbers. Press a button on your controller and ARC will highlight the matching row (blue) so you can identify it.

2) Button-Down Command

Script/code entered here runs when the button is pressed. Use this for actions you want to start immediately (example: Say("Hello"), CameraStart(), Forward(), etc.).

3) Button-Up Command

Script/code entered here runs when the button is released. Use this for “stop” actions or toggles (example: Stop(), CameraStop(), open/close gripper, etc.).

Settings: Variables Tab (Read Stick Values in Scripts)

Variables tab annotated

1) “Set EZ-Script Variables”

Enable this if you want ARC to continuously store joystick positions into variables that your scripts can read.

  • Analog sticks (#1 and #2): values from -32768 to 32767
  • Triggers: values from 0 to 255

2) Variable Names

You can customize the variable names (example: $JoystickX1, $JoystickY1, etc.) so your scripts are easier to read.

How Movement Works (Driving a Robot)

When joystick movement control is enabled, the controller will drive the current Movement Panel in your ARC project. If your Movement Panel supports variable speed, pushing the stick slightly can move slowly, and pushing further moves faster.

The stick can also be used to turn. Depending on the Movement Panel, moving left/right may rotate the robot or “spin in place”.

Deadband (Movement Sensitivity) Visual

Deadband means “ignore small stick movement near the center”. This prevents drift and helps you control when turning/spinning starts.

Deadband diagram

Code Sample: Control Controller Vibration (Rumble)

Some controllers support vibration motors (left and right “rumble”). This skill exposes vibration using: controlCommand(). The example below maps trigger values (0–255) to rumble strength (0–100).

map = function (value, in_min, in_max, out_min, out_max) {
  return (value - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

while (true) {

  var y1 = map(getVar("$JoystickX3"), 0, 255, 0, 100);
  var y2 = map(getVar("$JoystickY3"), 0, 255, 0, 100);

  controlCommand("Joystick (Direct Input)", "VibrateLeftAndRight", y1, y2);

  sleep(100);
}
Note: This sample assumes you enabled variable output on the Variables tab so $JoystickX3 and $JoystickY3 update automatically.

Requirements & Compatibility Notes

Recommended controller: Logitech F710 Wireless Joystick.

  • On the Logitech F710, set the physical switch to D (DirectInput), not X (XInput).
  • This ARC skill uses the Windows DirectInput driver system. Different controllers may behave differently depending on their driver and mode.

Resources

Xbox Controller Mapping (DirectInput vs XInput)

Microsoft documents how Xbox controllers appear in DirectInput: DirectInput and XUSB devices.

  • The D‑Pad may not function in DirectInput mode on some Xbox controllers.
  • On some devices, the two triggers may be combined into a single axis in DirectInput.
Xbox controller mapping reference image

Video


ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.