Plugin: Controlling Arduino

Discussion in 'General Discussion' started by dv8r, Jan 4, 2012.

  1. dv8r

    dv8r Registered

    Joined:
    Oct 13, 2010
    Messages:
    55
    Likes Received:
    0
    I know rF2 is not released, but has anyone put together the basics for this yet?

    With rF1, i was met with endless header conflicts and never really finished what i started. So i will start fresh with rF2, and if anyone would like to contribute please do so here. My goal is to produce a basic hardware control plugin with hardware that costs under $200 to provide some basic motion. It will not be a full motion simulator, but rather a smaller setup that modifies a standard computer chair to provide small amounts of gforce based feedback. Ive seen other (and better) ways of doing this, but this is as much a project in self education as anything else. I will be using pure c++ for my code.

    All input welcome.
     
  2. STRZ

    STRZ Registered

    Joined:
    Dec 29, 2011
    Messages:
    22
    Likes Received:
    0
    "CAN open" support would be great, not only for motion rigs, as well for steering wheels because the application can directly interact with servo controllers through the game software ( handling linear actuators for example ). Can open is a standard language for those devices. Arduino doesn't support the CAN language, unfortunately. But the "blueboard" does.

    Afaik RF pro is supporting it already enabling the professional teams to use "steer by wire technology"

    DirectX based force feedback controllers wich are a immersion company patent ( monopole ) are not needed anymore if you have can bus support implemented, its superior to the force feedback possibilities we know from directX.

    Arduino support would be great too, hope you get the input here you're looking for.
     
    Last edited by a moderator: Jan 4, 2012
  3. johnnyfive

    johnnyfive Registered

    Joined:
    Oct 13, 2011
    Messages:
    12
    Likes Received:
    0
    When you mention Arduino control, I suppose you want to send and receive data from an Arduino. If so, once you control your simulation system with an Arduino, you can implement a messaging protocol to use in communications (eg. serial) between the Arduino and a PC. Use this protocol to control the Arduino from your PC (rFactor plugin).

    Check out rFactor2Python examples folder (its in Python, not C++) for a simple example. http://emcheio.com/2a

    Cheers,
    João C.
     
  4. dv8r

    dv8r Registered

    Joined:
    Oct 13, 2010
    Messages:
    55
    Likes Received:
    0
    Thanks johhnyfive, yeah i have seen rF2Python, and yes, at this point i have managed to use serial to control a small RC servo. I have revisited my rF1 plugin and managed to use the acceleration parameters to control the position of the servo, so i think im heading down the right track. Surprisingly, it was less than 10 lines of code in C++ ( ontop of the example plugin ), and the arduino is no more than 50 at this stage. Its still early days and everything is very basic.
     

Share This Page