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

Mini racing Simulator

Discussion in 'New users start here - FAQ' started by Sergey Komarevtzev, Jul 12, 2014.

  1. Sergey Komarevtzev

    Sergey Komarevtzev New Member

    Joined:
    May 8, 2014
    Messages:
    25
    Balance:
    297Coins
    Ratings:
    +6 / 0 / -0
    I build a small version of racing simulator. It is good for understand the way simulator works and the Axis moves. but i have some problems to set the YAW axis with ROLL together.

  2. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,400Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Which code are you using ?, mine can be sorted quiet easy, and its for SimTools not Xsim.
  3. Sergey Komarevtzev

    Sergey Komarevtzev New Member

    Joined:
    May 8, 2014
    Messages:
    25
    Balance:
    297Coins
    Ratings:
    +6 / 0 / -0
    sorry i use the SimTools to ... i wrote by mistake.

    the code:
    #include <Servo.h> // the servo library
    #define SERVOS 2 // the number of servos
    int servoPins[SERVOS] = {9,10}; // servos on pins 7 through 10
    Servo myservo[SERVOS];
    void setup()
    {
    Serial.begin(9600);
    for(int i=0; i < SERVOS; i++)
    myservo.attach(servoPins);
    }
    void loop(){
    serviceSerial();
    }

    void serviceSerial()
    {
    static float pos = 0;
    if ( Serial.available()) {
    char ch = Serial.read();
    if(ch >= '0' && ch <= '9')
    pos = pos*10 +(ch - '0');
    else if(ch >= 'a' && ch <= 'a'+ SERVOS){
    myservo[ch - 'a'].write((pos/255)*180);
    pos = 0;
    }
    }
    }


    the code is Arduino uno for Servos.
  4. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,400Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
  5. Sergey Komarevtzev

    Sergey Komarevtzev New Member

    Joined:
    May 8, 2014
    Messages:
    25
    Balance:
    297Coins
    Ratings:
    +6 / 0 / -0
    where i can find this working code that you talking about?
    and i can't find something about the axis assignments some tutorial to define it right ...
  6. insanegr

    insanegr !N$@n€

    Joined:
    Jan 14, 2014
    Messages:
    505
    Location:
    Athens
    Balance:
    16,715Coins
    Ratings:
    +499 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    • Like Like x 1
    • Informative Informative x 1