1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Quick question from a newcomer

Discussion in 'New users start here - FAQ' started by MikeyTT, Jan 9, 2013.

  1. MikeyTT

    MikeyTT New Member

    Joined:
    Dec 20, 2012
    Messages:
    1
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi all. Certainly had my eyes opened recently to the sim rig world, never knew it existed. I only started looking after getting into pCars and seeing a self made dash on YouTube and thought, I could do that........ Surely.....How hard could it be? ;-)

    So far I'm pretty happy with my progress of a self made dash (maybe get to a full motion rig one day). I have X-Sim running with rFactor2 (pCars has no API yet) and I'm receiving data, which took a while, but I got there. I also have an Arduino that's now receiving the data and I can get Revs, Speed, Gear and I can drop that onto a 4-digit 7-segment display. I only have 1 at present, so with a quick code change I can get it displaying all info from x-sim.

    What I want the dash to do tho is to send info back from the Arduino to the game, this is for switches, etc. So without x-sim in the equation I can send data from the Arduino to a C# app and although I've not done it yet I think it's fairly easy to then send keystrokes to rFactor2. But if I put x-sim back in the loop there doesn't appear to be a way I can extract data from the Arduino, it's a 1-way street if I understand it correctly.

    This is where I'm a little stuck. I can think of two ways around this so far, but neither is particularly great:
    • Get another Arduino connected via USB to run the switches and output from Arduino feeds
    • Create a virtual serial device in the PC and get x-sim to send data to that. I'll create a C# app to then attach to the Arduino, which will grab data from the x-sim feed and just offload it to the Arduino unchanged. But as the serial port to the Arduino is connected to the C# app I can also read from it and then pass that to rFactor as keypresses, etc.

    The latter approach is double handling the data, which is never good and the first requires additional hardware and USB connectivity + more to go wrong. So I'm hoping that there is some obvious route, existing library, plugin or something I'm missing that will set me right.

    Mike...
  2. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0