arduino controller input?

the_kdoggy

New member
Has anyone been able to get an arduino or other microcontroller board talking to TRS19 yet?

I figure someone has at least tried to build a control stand ;)
 
Rail driver works and so does keyboard input through the USB port.

I might try looking at a Raspberry Pi first it has a lot more processing power and is well documented.

Cheerio John
 
Ill check on the Pi side also, but my biggest question is will anything other than a Raildriver or Xbox 360 controller be recognized? I have several other joysticks I've tried that have not been recognized either, including a Logitech gamepad.
 
I typed "convert joystick to keyboard output" in Google search and found a lot of good alternatives. I have used sw in the past to use my Microsoft joystick where keyboard input is needed, so there is a lot of stuff out there. Basically if you can convert the output to a keybind, you can use it in Trainz. As for using an Arduino vs PI, the Arduino will be fine. There is one I am planning to use that can be programmed to look like a mouse and/or keyboard. (I bought the parts to make my own version of the Raildriver but haven't gotten around to putting everything together yet. Someday :)

The original Raildriver, looked like a keyboard to the system. I think it changed quite a bit since then.

Also have a look at AHK. It is software that remaps keys. I found an article about remapping a joystick to keyboard here: https://www.autohotkey.com/docs/misc/RemapJoystick.htm
 
I can do the keymapping ok, I was hoping to find a way to interface to the camera analog controls, so I could move/pan/tilt/rotate at varying speeds.
Oh well, I'll try again later...

I just hope I can get my raildriver working again with this beta version, I had to downgrade last time to get it working again. PI Eng. wouldn't help with the beta version.
Thank you for the suggestions regardless!!
 
Ok, for anyone looking for a solution to this same issue, I believe Trainz is using the xbox controller type device rather than HID devices. If a dev wants to confirm, I couldn't find any documentation stating it was xbox specific. I found a solution in a open-source project called x360ce located here:
https://github.com/x360ce/x360ce
(*And just for my mental note, it was using the spacemouse device itself and not the KMJ Emulator they install along with it...)

Haven't gotten far with it beyond working with my spacemouse, but it seems to have promise integrating other types of HID controllers as well.
I have a feeling that the xbox adaptive controller might also work for simple buttons and potentiometer based inputs, but I don't have one to test that theory.
Hope this helps someone else later on ;)
 
Back
Top