1. 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!
  2. 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
  3. 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
yobuddy

SimTools v2 - Game Dash v2.3

Format and Send Game Dash data to a device/program.

  1. Hoddem

    Hoddem Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    375
    Occupation:
    Engineer
    Location:
    Minnesota, USA
    Balance:
    2,970Coins
    Ratings:
    +627 / 2 / -0
    This is how I am reading the speed data for a wind generator using and arduino mega.

    Serial.begin(9600);
    void ReadData(){
    if (Serial.available() == 4) { //if 4 bits available in the Serial buffer...

    int i;
    for (i=0; i<4; i=i+1) { // read and label each byte.
    bufferArray = Serial.read();
    }

    if (bufferArray[0] == 'S'){
    SpeedGameDash = ((bufferArray[1]-48)*100) + ((bufferArray[2]-48)*10) + // Take values 1-3.
    ((bufferArray[3]-48)*1);
    }


    From my build log
    Here is a link to my test code within the simulator - https://www.tinkercad.com/things/4xxRB8A56AP
    If you want to play around with it, just open up the serial monitor and start typing commands in the form S000, I have the input range from S000 to S200.


    Open the link, click Simulate, Click Start Simulation, Click Code, Click Start Serial Monitor.

    I have the speed Ssaled to ouptut from 0-200 to 0-255 for PWM.

    Last edited: Dec 7, 2018
  2. RiftFlyer

    RiftFlyer Active Member Gold Contributor

    Joined:
    Apr 15, 2014
    Messages:
    194
    Balance:
    1,651Coins
    Ratings:
    +118 / 0 / -0
    My Motion Simulator:
    DC motor
    Thanks for the help guys. I’m still not having much success. @yobuddy Math +3 works to remove the negative numbers but adding ToChr is returning unusual symbols in the output. Some gears are not outputting anything and the others appear like Windings.

    If I do not apply any conversions and try to Serial.print the incoming string in the arduino serial monitor it just remains blank.

    Here is my serial interface settings:

    Capture.JPG

    This is some of the output characters:

    Capture2.JPG
    Here is another example which shows the functions applied and the virtual output

    Capture2.JPG

    I've been running various test code on the Ard such as these:

    Code:
    int a;
    void setup() {
      // put your setup code here, to run once:
    Serial.begin(9600);
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
    while (Serial.available()){
      a = Serial.read();
      Serial.println(a);
     
    }
    }
    Code:
    String a;
    void setup() {
      // put your setup code here, to run once:
    Serial.begin(9600);
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
    while (Serial.available()){
      a = Serial.readString();
      Serial.println(a);
  3. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,577
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    19,823Coins
    Ratings:
    +3,379 / 33 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    I have just updated game dash to v2.2 and now I'm having the problem I had before with my fans blowing at full speed if I turn game manager on and off. Only way i can stop it is by unplugging my uno and plugging it back in again.

    Cant think for the life of me how I fixed it last time it was doing it.
  4. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    3,788
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    34,010Coins
    Ratings:
    +3,940 / 10 / -0
    Yep, That is expected.
    These chars correspond to the acii table and they hold the value you would expect.

    So all you need to do I believe is convert the string to an integer in the ard.
    int InInt = atoi(InData);

    Take care,
    yobuddy
  5. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    3,788
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    34,010Coins
    Ratings:
    +3,940 / 10 / -0
    @SilentChill
    Are both GameDash and SimTools running the latest version?
  6. RiftFlyer

    RiftFlyer Active Member Gold Contributor

    Joined:
    Apr 15, 2014
    Messages:
    194
    Balance:
    1,651Coins
    Ratings:
    +118 / 0 / -0
    My Motion Simulator:
    DC motor
    @yobuddy thanks so much for your continued help on this forum. It's amazing how much I am learning from trial and error and from the info on these pages. I discovered something, which is fairly obvious in hindsight - you can't use the ARD serial monitor when simtools is communicating with the board. I spent two evenings reading and revising my code wondering why I had no data before I realised that!
    I just setup an i2c link to a second board and passed it the incoming data so I could see what was going on with a second com port. Well I now have my gear value appearing correctly :grin
  7. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    3,788
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    34,010Coins
    Ratings:
    +3,940 / 10 / -0
    @RiftFlyer
    Success, Great job man!
    Yes, being a serial device, only one thing can be connected to it at a time.
    (Although, you can use a serial port monitor)
    Can't wait to see the project when your finished!
    Take care,
    yobuddy
  8. HoiHman

    HoiHman Active Member

    Joined:
    Feb 1, 2015
    Messages:
    211
    Occupation:
    Mechanic
    Location:
    The Netherlands
    Balance:
    322Coins
    Ratings:
    +143 / 1 / -0
    Just checking, but both windows defender AND Eset see gamedash as a trojan :think

    [​IMG]
  9. Red_shift

    Red_shift Member Gold Contributor

    Joined:
    Sep 2, 2017
    Messages:
    53
    Location:
    Charlotte
    Balance:
    344Coins
    Ratings:
    +51 / 1 / -0
    Yes I am seeing that too :(
  10. HoiHman

    HoiHman Active Member

    Joined:
    Feb 1, 2015
    Messages:
    211
    Occupation:
    Mechanic
    Location:
    The Netherlands
    Balance:
    322Coins
    Ratings:
    +143 / 1 / -0
    @yobuddy can you please take a look this?
  11. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    15,577
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    114,188Coins
    Ratings:
    +9,139 / 46 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  12. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    3,788
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    34,010Coins
    Ratings:
    +3,940 / 10 / -0
    It's a false positive because the first thing the app does is make a UDP listener.
    Of course its so we can collect data from SimTools, but the AV does not know that apparently.
    Install AVG free or Avast free and it won't be a problem.
    Take care,
    yobuddy
  13. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    3,788
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    34,010Coins
    Ratings:
    +3,940 / 10 / -0
    • Winner Winner x 1
  14. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    3,788
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    34,010Coins
    Ratings:
    +3,940 / 10 / -0
    • Winner Winner x 1
  15. mimakez

    mimakez Member

    Joined:
    Jun 18, 2015
    Messages:
    34
    Balance:
    261Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I use game dash v2.3 and simtools v2.4 and now I have a problem with full fans speed when I start the game. The only way I can stop it is by disconnecting the usb cable. I started the game several times with the same settings and the fans worked as they should.
    Anyone have an idea?

    P.S. I use arduino uno with code by @SilentChill on com port 4

    I reinstalled the game dash and everything works perfectly again !!! :)))

    Attached Files:

    • IMG.JPG
      IMG.JPG
      File size:
      386.1 KB
      Views:
      100
    • Like Like x 1
    Last edited: Aug 14, 2019
  16. paulopsx2

    paulopsx2 Active Member

    Joined:
    Apr 2, 2016
    Messages:
    491
    Location:
    brasil
    Balance:
    403Coins
    Ratings:
    +108 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    so, problem solved?
  17. mimakez

    mimakez Member

    Joined:
    Jun 18, 2015
    Messages:
    34
    Balance:
    261Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    The problem is not solved. After restarting the computer, the fans run at full speed again. I tried with and without oculus rift cv1. I tried reinstalling the game dash again, but that no longer solves the problem.

    I'm going to go crazy with this. This morning I turned on the pc and started the game and everything worked fine, I restarted the pc and started the game again and the fans were running full speed. Game dash normally reads speed from the game both when everything is ok and when the fans are running at full speed.

    I made a video that you can see in the links below:

    Work fine
    https://drive.google.com/open?id=16g1twhYgY9o9tF21eVek-dxHrpmho4Wo
    Full speed
    https://drive.google.com/open?id=1cuTL-BXj5Dc6DAh_GiZlrhY91AhBAKlE
    Full speed
    https://drive.google.com/open?id=17mKbai2Z-CUfWQSC1htJfexarCBUAy9w
    Last edited: Aug 16, 2019
  18. mimakez

    mimakez Member

    Joined:
    Jun 18, 2015
    Messages:
    34
    Balance:
    261Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Definitely problem solved !!!

    The problem was that I had 2 same interface settings typed in game engine and in game dash.

    What i did to solve it is that i removed interface settings from interface 2 in game engine.

    When it doesn't work
    When it doesn`t work.JPG
    When it works
    When it works.JPG
    • Like Like x 1
    • Winner Winner x 1
  19. paulopsx2

    paulopsx2 Active Member

    Joined:
    Apr 2, 2016
    Messages:
    491
    Location:
    brasil
    Balance:
    403Coins
    Ratings:
    +108 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    great ! cheers
  20. Franck TALBART

    Franck TALBART Franckarts

    Joined:
    Sep 6, 2019
    Messages:
    7
    Balance:
    - 265Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hi Team,

    I am using game dash to control a fan with a L298N component and a Arduino. Unfortunately, it seems that using the same Arduino with game dash and simtools is not possible, because the same serial port is required by both tools.

    I would like to avoid buying another Arduino for such simple task, and keep a single Arduino to control the fan and the motors at the same time.

    My question is : would it be possible to send both Simtools and game dash data from the same tool, i.e. X1<Axis1a>CS<Dash1>C? Doing so would avoid the serial port conflict and save a lot of complexity on the HW side. Maybe I am missing something and there is already a trick to do that?

    Thanks for the help!