Issues with Game Control Plus/Processing & Arduino

Hello,

Newbie to Processing, and coding in general here. I am working on a project to control a 12v motor from a button on a sim racing steering wheel. The motor will be powered off most of the time, but I want it to activate when I press a specific button for the duration of the press. The below code is what I have so far, and it works with my Dualshock 4 controller.

import processing.serial.*;

import net.java.games.input.*;
import org.gamecontrolplus.*;
import org.gamecontrolplus.gui.*;

ControlIO control;
Configuration config;
ControlDevice gpad;

Serial MySerial;

void setup() {
  control = ControlIO.getInstance(this);
  gpad = control.filter(GCP.GAMEPAD).getMatchedDevice("Gamepad");
  size(400, 600);
  MySerial = new Serial(this, "COM5", 9600);
}

void draw() {
  background(255, 0, 0);
  if (gpad.getButton("ACTIVATE").pressed()) {
    MySerial.write(1);
  } else {
    MySerial.write(0);
  }
}

I do get the exact error message below every time I run the script but otherwise it works as intended.

Failed to initialize device ITE Device(8595) because of: java.io.IOException: Failed to acquire device (8007001e)
Failed to initialize device ITE Device(8595) because of: java.io.IOException: Failed to acquire device (8007001e)

And the real trouble comes with the fact that the Dualshock is the only game controller device that I can get to work. Whenever I try my steering wheel or button box they do not work. I get the same error messages, but the other devices do nothing, and send nothing into serial monitor whereas the Dualshock will.

I have tried calling the steering every way I know how, including trying to call a specific setup file. But for example this is how I’m currently trying to call it, and I have triple checked to ensure this is how the wheel is identified in Processing/GCP.

ControlIO control;
ControlDevice device;
ControlButton ACTIVATE;

Serial MySerial;

void setup() {
  control = ControlIO.getInstance(this);
  device = control.getDevice("Thrustmaster Advanced Mode Racer");
  size(400, 600);
  MySerial = new Serial(this, "COM5", 9600);
}


Does anyone have any idea why my Dualshock will work but other peripherals can’t be initialized? The Dualshock is the last controller I would want to do this function. Any help would be greatly appreciated!

I suggest that you read this webpage it explains why GCP might not work with modern controllers.

Ah thank you. Do you know of any other libraries that do something similar that might work better with modern controllers?

Not that I know of - sorry