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

Tutorial SimTools v3 - RPM Dash Example (with Arduino Sketch)

Discussion in 'Tutorials and Tips by the Developer' started by yobuddy, Apr 26, 2023.

  1. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,394
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    50,506Coins
    Ratings:
    +5,156 / 18 / -0
    Here is a good example of how to use the dash feature found in SimTools v3.
    (Special thanks to @early_m for helping with this post!)

    Below you will find a wiring diagram, a sketch for an Arduino, and instructions to turn an addressable led strip into a RPM bar. The Sketch is setup to use a WS2812B led strip, but anything compatible with the FastLED Arduino api will work as well.



    Here is the led strip wiring diagram:
    upload_2023-4-25_16-5-10.png


    RPM Arduino Sketch:
    RPM.zip

    Once the file is opened, be sure to set the settings below.
    - the number of led's in your led strip.
    - when color#2 starts
    - when color#3 starts
    - max brightness of your led strip (255 is max)
    - the pin number for the led strip to connect to.
    Pic10.jpg

    And you can edit the 3 colors you want to use in your strip here
    (It's RGB values where 255 is max and 0 if off)

    Then upload it to the Arduino you are golden!
    Pic11.jpg

    SimTools v3 setup.
    Go to the interface settings and connect your new led bar
    Dash Interface.jpg


    Then go to the edits for rpm and set the command GetBits 0 9000 8 b, where 9000 is the max rpm you want to use for the profile.
    Dash Output Rules.jpg

    And lastly, tell SimTools what to send for output
    Dash Outputs.jpg

    That's it, now run the game and enjoy!
    yobuddy
    • Winner Winner x 2
    • Informative Informative x 2
    • Like Like x 1
    Last edited: Sep 21, 2023
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,542
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,872Coins
    Ratings:
    +11,024 / 56 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Like Like x 1
    • Winner Winner x 1
  3. hansvdm

    hansvdm Member

    Joined:
    Sep 21, 2023
    Messages:
    57
    Occupation:
    Freelance
    Location:
    leiden Netherlands
    Balance:
    108Coins
    Ratings:
    +11 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    What values do I have to change ?

    I have led strip with 72 leds, Using RaceRoom game. When I start the game 12 leds (all green) lit up. More rpm the blue light up (20 leds are green, and after 20 blue leds lit up and then red lit-up max 6 red leds.
    so the maximum number of leds that lit up is 46 while I ave 72 leds :)

    I want default 3 leds on, then with higher rpm 25 green on, than 30 blue and than 17 red when rpm is max.

    thanks for any help on this

    Hans

    @yobuddy
    Last edited: Nov 18, 2023
  4. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,394
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    50,506Coins
    Ratings:
    +5,156 / 18 / -0
    If you have set the proper settings in the sketch here:
    upload_2023-11-18_10-47-15.png
    if you still don't get all led's on, take a look at the Hi/Low settings for rpm for the game.
    My guess is the Hi values is to Hi is all.
    Let me know how it goes buddy!
  5. hansvdm

    hansvdm Member

    Joined:
    Sep 21, 2023
    Messages:
    57
    Occupation:
    Freelance
    Location:
    leiden Netherlands
    Balance:
    108Coins
    Ratings:
    +11 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    thanks for the tip

    I have Race Room Experience and used this settings: Getbits 1550 5500 8 b. The ledstrip works great now. By default 1 led is on and with full RPM all 72 leds lit up.
    • Like Like x 1
  6. aparecido

    aparecido diy 2dof for flight simulator 2020

    Joined:
    Oct 21, 2023
    Messages:
    58
    Occupation:
    MECHATRONIC TECHNICIAN
    Location:
    BRAZIL
    Balance:
    - 27Coins
    Ratings:
    +20 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Does the sketch go with the dof 2 sketch?
  7. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,394
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    50,506Coins
    Ratings:
    +5,156 / 18 / -0
    You would use another Arduino for this, not combine it with the motion side of things, if that is the question?
  8. aparecido

    aparecido diy 2dof for flight simulator 2020

    Joined:
    Oct 21, 2023
    Messages:
    58
    Occupation:
    MECHATRONIC TECHNICIAN
    Location:
    BRAZIL
    Balance:
    - 27Coins
    Ratings:
    +20 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Yes, my question would be this, do I have to use another Arduino? Another question is how is the acceleration signal recognized?
  9. aparecido

    aparecido diy 2dof for flight simulator 2020

    Joined:
    Oct 21, 2023
    Messages:
    58
    Occupation:
    MECHATRONIC TECHNICIAN
    Location:
    BRAZIL
    Balance:
    - 27Coins
    Ratings:
    +20 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    From what I understand, the signal is recognized by the serial port.
  10. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,394
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    50,506Coins
    Ratings:
    +5,156 / 18 / -0
    Yes, as Dash and Motion interfaces are separate.

    We are using the RPM output from the Dash section.
    upload_2023-12-9_11-2-11.png
    • Like Like x 1
  11. aparecido

    aparecido diy 2dof for flight simulator 2020

    Joined:
    Oct 21, 2023
    Messages:
    58
    Occupation:
    MECHATRONIC TECHNICIAN
    Location:
    BRAZIL
    Balance:
    - 27Coins
    Ratings:
    +20 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks for the info
    • Like Like x 1
  12. RJ Stausebach

    RJ Stausebach Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    55
    Location:
    Ireland
    Balance:
    323Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    Arduino
    Hi @yobuddy , Thanks for this example. I am trying to use the same settings I had in Dash for Simtools 2.x in the MSFS2020 plugin that drives a force feedback actuator (based on airspeed) and a wind generator (based on RPM) in the Dash for Simtools v.3 for the MSFS2024 plugin.
    The FS2020 version relied on the converting of the return to HEX. This code is no longer accepted in the V3 FS2024 by the looks of it? So in the Output Rules it does not accept the TOHEX statement. What code should be used now please?

    upload_2025-5-19_15-54-53.png

    upload_2025-5-19_15-53-7.png
  13. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,394
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    50,506Coins
    Ratings:
    +5,156 / 18 / -0
    @RJ Stausebach,
    I will take a look, and make sure ToHex is in the next release.
    For now I believe you can use: GetBits 0 255 8 H
    • Informative Informative x 1
  14. RJ Stausebach

    RJ Stausebach Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    55
    Location:
    Ireland
    Balance:
    323Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    Arduino
    Many thanks @yobuddy !
    Will try that this weekend and let you know.
  15. RJ Stausebach

    RJ Stausebach Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    55
    Location:
    Ireland
    Balance:
    323Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    Arduino
    Hi @yobuddy , so gave it a try. That did not work. Let me qualify, the Airspeed (still) works (it worked before without the Hex code). The RPM still does not work. I suspect that the MSFS2024 plugin may not be identifying the RPM correctly? I am looking for the Prop 1 RPM. It worked in the MSFS2020 plugin. For the MSFS2024 plugin you do not specify what RPM it is looking at?
    At 8 bits the 255 is not enough to cover the expected 3000rpm range, I can see that using 16 bits my max RPM is showing around 32000. So it is picking up something but not sure what. My range, converted to Hex, would need to be between 0 and 3000. What coding would achieve this?
    Thanks,
    Roel
    ps. the Virtual Output confirms that speed is being read and RPM maxes out at 255.
    [​IMG]
    Last edited: May 25, 2025
  16. RJ Stausebach

    RJ Stausebach Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    55
    Location:
    Ireland
    Balance:
    323Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    Arduino
    This is the screenshot for virtual window
    upload_2025-5-25_10-33-48.png
  17. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,394
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    50,506Coins
    Ratings:
    +5,156 / 18 / -0
    The 2024 plugin is using RPM 1 for the input.
    Code:
      MFS2024_simconnect.AddToDataDefinition(DEFINITIONS.Struct1, "PROP RPM:1", "Rpm", SIMCONNECT_DATATYPE.FLOAT32, 0!, 10)
    I finished adding ToHex to the dash output commands this weekend. I have a few more things to do and will then push the update out (probably later in the week).
    Take care! :thumbs
    Last edited: May 26, 2025 at 23:12
  18. RJ Stausebach

    RJ Stausebach Member Gold Contributor

    Joined:
    Jul 9, 2017
    Messages:
    55
    Location:
    Ireland
    Balance:
    323Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    Arduino
    Thanks @yobuddy , Perfect!