WIP Beta released Arduino Dashboard Connector

Discussion in 'Utilities and programming' started by Master0wn3r, Aug 19, 2018.

?

Do you like this?

  1. Yes

    100.0%
  2. No

    0 vote(s)
    0.0%
  1. Master0wn3r

    Master0wn3r
    Expand Collapse

    Joined:
    Nov 3, 2014
    Messages:
    26
    Hello all, as some of you may have read I have been working on a tool that can read certain values from the game (like speed, rpm and gear) and send these in a loop to your micro controller com device so you can power individual LEDs with certain values from the game (like a shift light or even a tacho bar and blinkers). You can go even further and power CAN driven devices like instrument clusters.

    For now I bring you a yet limited tool that can send: Speed, RPM and Gear to your COM device (Arduino and other micro controllers).

    If you want to see what the program looks like and what you can do with it I highly advise you to read my previous post to see the advances we made in the last months! https://www.beamng.com/threads/beamng-arduino-dashboard-connector.53969/

    In order for the tool to even work you have to have a COM device connected or else the tool wont be able to read anything as it will not be able to send anything to your device. If you are not in the posession of COM devices like Arduino you can also install a fake COM device on your computer and attach the tool to the fake COM device and you will see all the values from the game on the tools interface.

    How to install?
    Once you have downloaded the .rar file containing Arduino Dashboard.exe and InSimDotNet.dll and a folder you have to drag the lua folder into the root of the BeamNG folder, this file contains a modified outgauge.lua file so we could read everything we want from the game, if you do not transfer this file the tool does not read the right values and may not work like it is supposed to!
    The other 2 files can be placed anywhere as long as they are together.

    How to setup BeamNG?
    Once you have launched BeamNG and you are on the main menu go to options and then "other" and
    verify the outgauge settings are like this:


    Once everything is setup, you have to connect the tool with the game on the main menu! this is important when powering your LED dashboard or CAN devices. you can connect the tool ingame and the tool will read the values realtime but as it is out of sync the COM device wont accept any values.
    Connecting while on the main menu will prevent this from happening.

    How to use the send values?
    The features that are not enabled for now will be shown in the tool interface but will not be send to your COM device, the only values for now that are being send are speed, rpm and the current gear.
    You must be able to do basic wiring on an Arduino breadboard!



    However the coding may be a bit more advanced!!!
    As the values are being send in a loop and not individual values we have assigned identifier bytes to every value so you can code and Arduino script that knows when it sees a certain token the data was xxx

    The important endbytes for now are:
    RPM_END_BYTE = '+';
    SPEED_END_BYTE = '=';
    GEAR_END_BYTE = '!';

    This means that when you are driving in the 6th gear at 120km/h and 2500rpm the looping string looks like this: 02500+120=6! and this is an never ending loop with the same format everytime and the identifier bytes also known as "EndBytes" on the same place.

    So what you have to do is create a loop that can read the endbytes and put the looped information in single strings you can call like: if RPM >7000 LED7 = true (very short and easy example but basically coding works like this but is not that easy as stated above).

    For now we want people to test the tool and connect it to a (fake) COM device just so you can see the tool working but we encourage people to try and write a Arduino code to power LEDS (it takes some time like it did me but it is doable!!) once everything is going as planned: people trying the tool, I will release the full version and an (basic) Arduino script to help people out. if that all goes right I will tell you guys how to power instrument clusters with CAN-bus! but getting the LEDs to work is crucial before getting the CAN-bus working ;-).

    If you really have in depth questions about how to get it working/power leds I will answer you personally but I will not give the whole code to individuals.

    I really encourage the staff to test this, because how cool would it be if BeamNG could natively support COM output ;-). (If wanted staff can test the whole product).

    *For people wanting the know why their IP is being noted in the too, this was to prevent it from leaking using build in authentication this has been removed because problems could occur when booting the tool.
    Virus scanner may give a false positive this is due to code encryption!

    Thank you all for reading and you can download the tool here:

    DOWNLOAD V2.5!
     
    #1 Master0wn3r, Aug 19, 2018
    Last edited: Aug 19, 2018
    • Like Like x 6
  2. Nitro101

    Nitro101
    Expand Collapse

    Joined:
    Sep 27, 2012
    Messages:
    9
    This looks very interesting, I took an Arduino class a few years ago. Never did anything like this, but this certainly looks very cool.
     
    • Like Like x 1
  3. Master0wn3r

    Master0wn3r
    Expand Collapse

    Joined:
    Nov 3, 2014
    Messages:
    26
    This can be very challenging for now but it would be cool of people managed to build something themselves :), for now just seeing how the tool responds to your game etcetra is important for me and an release for an Arduino code is planned for the future.
     
  4. Nitro101

    Nitro101
    Expand Collapse

    Joined:
    Sep 27, 2012
    Messages:
    9
    I like the fact that you’re doing something creative while also trying to accomplish a task and or goal. =)

    The most advanced thing I personally remember doing in Arduino is sending some code to the board(Not the Arduino device but an actual board with multiple connections and ports), which in turn made some lights connected on the board blink in a specific pattern and frequency that was changeable from the IDE.

    I still have my old box of Arduino stuff lying around somewhere in the house. IDK, perhaps I’ll get into it again.
     
    • Like Like x 1
  5. Master0wn3r

    Master0wn3r
    Expand Collapse

    Joined:
    Nov 3, 2014
    Messages:
    26
    basically this is what the you have to do with the tool, you have to build a code that can react to the values given by the tool, and once you get the LEDS working like make led 3 power at 3000rpm you are at 90% of powering a real instrument cluster.
     
  6. Nitro101

    Nitro101
    Expand Collapse

    Joined:
    Sep 27, 2012
    Messages:
    9
    Yeah it looks very interesting what you can do with this tool. I’m just amazed you took the time and personal effort into making this tool for the community.

    We legitimately need more people like you in the world who dedicate themselves to improving the life, helping, and assisting other people.

    I hope that many people download your tool and take advantage of its potential to be a good physical real world example of data connection from the digital space into the real world.
     
    • Like Like x 2
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice