Jump to content
The simFlight Network Forums

AXIS CONTROL VIA A USB SERIAL DEVICE>NOT HID<


Recommended Posts

Hello all.

I am not sure how to ask this question. So I will explain what I need to do. I have been using EPIC thru FS Comm for many years to send Joystick axis to FS 9 and all was well, now however the EPIC card has died...So I have built an Arduino UNO throttel controler. Arduino is a Serial USB device (Not a HID device as is a joystick, I think)...So I wrote a VB 2010 program to interface to the Adruino and then to FS 9. I say in the VB pgm to read the serial value then send that to an FSUIPC offset. That works....But, as it is not a joystick axis I can not see it in FSUIPC axis assiments ( the problem is this, The ELEV. trim does not disconnect when in auto pilot so My trim send via an offset is conflicting with auto pilot,Yes I undestand that.

My question is then, How can I send the Arduino value ,As a USB Serial device to FSUIPC and FSUIPC see it as a joystick axis.?

I have read the docs on the LUA plugin "COM" and this seems to be the solution but I don't fully understand what I need to do to use it. For some reason I can't find the HIDDemo script in the LUA examples as stated in the docs. Pete has given instructions on

Handling VRInsight devices in FSUIPC

which is a serial USB device and so is the Arduino, but I need some direction on how to do this. as I don't have the "SerialFP2" Driver. So I am kinda lost. I don't know if I need that driver or not to do this.

To sum this up.... I think I need to make the Arduino value sent to be seen as a joystick axis so FS9 will disconnect it in the auto pilot mode, I think,but don't know how. Ron.

Link to comment
Share on other sites

I say in the VB pgm to read the serial value then send that to an FSUIPC offset. That works....But, as it is not a joystick axis I can not see it in FSUIPC axis assiments

There's a set of offsets you can use for exactly that. They are those in the range 3BA8-3BC6. They originated for use by my PFC driver, and so used to have a range only of 0-127 and had to be assigned as 'raw' for other uses, but all recent versions of FSUIPC will scale them automatically if they see a value greater. Or you can preset the scaling in the assignment lines in the INI file.

The PFC assignments normally made are listed in the offsets list, but you don't need to stick to those. Any of those offsets can be assigned to any axis control. They appear in the assignments on joystic numbers 16-18.

For some reason I can't find the HIDDemo script in the LUA examples as stated in the docs.

Well, it is one of the Lua examples still included in the "Example LUA Plugins.zip" file, which is inside the Lua_Plugins.zip package, which is installed for you in the FSUIPC Documents subfolder in your FS Modules folder. Or you can download the latest from the Download Links subforum. I don't know why you couldn't find it?

Pete has given instructions on

Handling VRInsight devices in FSUIPC

which is a serial USB device

But VRInsight devices are not HID devices, just normal serial COM devices, and FSUIPC does include special treament for those, so the document you refer to is not transferable.

.... as I don't have the "SerialFP2" Driver. So I am kinda lost. I don't know if I need that driver or not to do this.

SerialFP2 is a VRI driver, no use for anything else. And it is actually superseded now by VRI's newer software. You can't apply a driver made explicitly to handle one serial protocol to handle another completely different one.

o sum this up.... I think I need to make the Arduino value sent to be seen as a joystick axis

See the first answer, above,

Regards

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.