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

Capture iRacing Flag Data with iRacing SLI

Discussion in 'Miscellaneous' started by Jazz Ross, Aug 29, 2016.

  1. Jazz Ross

    Jazz Ross New Member

    Joined:
    Aug 20, 2016
    Messages:
    4
    Location:
    USA
    Balance:
    219Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino
    I am using the iRacingSLI application to pull telemetry data from iRacing to an Arduino running the ArduinoDash program. Along with the TM1638 module, I am also using the 'speed' data (from iRacing) in the Arduino to PWM a fan for wind simulation.

    The iRacingSLI application is great and works very well. However, I would also like to pull in iRacing flag data (green flag, yellow flag, black flag, red flag, checkered flag, etc.) to the Arduino via the iRacingSLI application. I know the iRacing API supports flag data (I believe the element is called 'sessionFlags' in the ), but I do not know how to go about modifying the iRacingSLI application to pull that data from iRacing.

    I am well versed on the electronics side of things and programming the Arduino, but I do not have experience with writing/modifying computer application. Can anyone please provide some assistance on what would need to be done with the iRacing SLI application to send iRacing's sessionFlags data to the Arduino?
  2. PiaMan

    PiaMan Active Member

    Joined:
    Aug 2, 2015
    Messages:
    192
    Location:
    Saskatchewan, CANADA
    Balance:
    607Coins
    Ratings:
    +131 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, SCN5, Arduino
    There is a program called iflag and the source is available. I've been hacking up the arduino side of the code to run a dmx stage light to show the flags. However the code to push the flag data is in the visual studio project. My project isn't done as I've been trying to convert the data meant for a matrix of led to just a brightness value for r g b. I've got it close but still a few off color outputs
    • Informative Informative x 1
  3. Jazz Ross

    Jazz Ross New Member

    Joined:
    Aug 20, 2016
    Messages:
    4
    Location:
    USA
    Balance:
    219Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino
    Thanks for the reply. I am aware of iFlag and was planning to use it to test the flag light I am making. However, I am trying to pull both the flag data and the speed data from iRacing using a single application, because I think the iRacing API only allows a single connection at a time. Correct me if I am wrong.

    I thought about using iWrap to run multiple clients, one for speed data and one for flag data, but this just seems clunkys, inefficient, and unecessary. Any experience with iWrap?

    Any ideas on how to modify either iRacingSLI or iFlag so that a single application is pulling both the 'speed' data and 'flag' data from iRacing to the arduino?

    Thanks!
  4. PiaMan

    PiaMan Active Member

    Joined:
    Aug 2, 2015
    Messages:
    192
    Location:
    Saskatchewan, CANADA
    Balance:
    607Coins
    Ratings:
    +131 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, SCN5, Arduino
    As far as I can tell you can have multiple connections to the iracing data. I use ispeed, sim commander and the arduino connector app for my dash and they all work. I was planning on running iflag as well but haven't brought it over to my main rig yet

    If you can program the arduino you should be able to read and amalgamate the code from the two connector apps as required. I didn't bother because I wanted my system to be an alternative to the matrix used in iflag. The dmx shield is on sale for $15 at princess auto and I already had dmx lights around
  5. Jazz Ross

    Jazz Ross New Member

    Joined:
    Aug 20, 2016
    Messages:
    4
    Location:
    USA
    Balance:
    219Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino
    Well that's great to hear that it can support multiple client connections! My originalienable plan was to run iFlag and iRacingSLI simultaneously, so I will just proceed with that plan and see if it works!

    Thanks for the quick replies! Let me know when you get your DMX lights working...I'd like to see them.
  6. PiaMan

    PiaMan Active Member

    Joined:
    Aug 2, 2015
    Messages:
    192
    Location:
    Saskatchewan, CANADA
    Balance:
    607Coins
    Ratings:
    +131 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, SCN5, Arduino
    I've been messing with the conversion but there is always one flag that doesn't work right. If you look through the Arduino iflag code and see a way to get one set of colour values from the matrix array let me know.

    I basically tried enumerating through the array, taking the values then averaging them. It mostly works but my blue flag is all colours.