Raildriver Custom Hardware Wip

Discussion in 'TSW General Discussion' started by Michael Huggins, Sep 18, 2021.

  1. Michael Huggins

    Michael Huggins New Member

    Joined:
    Sep 18, 2021
    Messages:
    21
    Likes Received:
    23
    Hi guys,

    I have been looking for a Raildriver for a while but I think they are hard to come by down here in NZ. Started getting bored with being stuck in lockdown so decided to make a custom DLL to work between TSW2 and an Arduino.

    I thought I would share it on my GitHub https://github.com/skaako/raildriver and see if anyone else finds it useful.

    You only need an Arduino of some sort and a pot to try it out. It's only set to work on COM3 at the moment so let me know if anyone's interested and I can add some more code to allow for settings etc.

    All of the analog inputs can be manipulated in the Arduino code. I haven't looked at doing any Raildriver buttons yet. One benefit I could see is the combined throttle and brake could be separated out into 2 different controls quite easily with the Arduino code then recombined into the data stream. I want to try to do this myself as I am not a big fan of the combined lever.

    Cheers
     
    • Like Like x 4
  2. Stephen Crofts

    Stephen Crofts Well-Known Member

    Joined:
    Aug 24, 2020
    Messages:
    859
    Likes Received:
    892
    this is looking really useful. It's getting costly to pay postage on a US bought rail driver, so this would help many willing enough to build their own hardware.

    I wish I could make use of it, I'm on console but managed to use the keyboard functionality of an Arduino to mimic keyboard presses with potentiometers. Not as ideal as this but works well enough.
     
    • Like Like x 1
  3. Michael Huggins

    Michael Huggins New Member

    Joined:
    Sep 18, 2021
    Messages:
    21
    Likes Received:
    23
    Thanks Stephen :) Yea I think anything for consoles would have to be implemented in the game I think. If it could be made so a second connected controller would then control the levers from the controllers analog axis might be a solution. That way a controller could be hacked apart to connect levers to the individual axis. I think there are 6 analog axis on most controllers now so this would be more than enough.
     
    • Like Like x 1
  4. Michael Huggins

    Michael Huggins New Member

    Joined:
    Sep 18, 2021
    Messages:
    21
    Likes Received:
    23
    I have added an INI file that can be used to set the serial port now.
     
  5. Michael Huggins

    Michael Huggins New Member

    Joined:
    Sep 18, 2021
    Messages:
    21
    Likes Received:
    23
    I have uploaded a new serial version to Github that includes the bytes for the buttons. I have also cleaned up the code so I can output the serial data at a higher refresh rate. Look into the updated Arduino code to see how many bytes you need for the buttons.

    Basically each byte covers 8 buttons, one for each bit of the byte.

    I think I know why it wouldn't work without installing Visual Studio so let me know if anyone gets it working without it as I don't have a machine to test it on with VS. This is only for the serial version.
     
    • Helpful Helpful x 1

Share This Page