Arduino Guage Cluster/Dashboard(+ source) for ATS

User avatar
Bart176
Posts: 2
Joined: 08 Jan 2015 14:51

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#71 Post by Bart176 » 07 Apr 2018 18:59

RodeoGeorge wrote: 21 Dec 2017 18:54
I have had that happen, and I cannot find out why.
The only solution that I've found is to disconnect, and then re-connect the servo while it is cycling.

RodeoGeorge
Same problem over here. Disconnecting while it is cycling doesn't help. It only stops cycling when a signal is received that the meter is turning. So with running engine the RPM indicator stops cycling but the speedo indicator keeps on cycling until i start to drive. It then behaves as it should, but when I stop the meters again start cycling. Using a Arduino Uno.

Bart
kasio
Posts: 1
Joined: 10 May 2018 20:39

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#72 Post by kasio » 10 May 2018 21:04

Can someone help me?
on my lcd only the marches (letters a, b, c, d, e, f ....) appear on the first line of the lcd
I think it might be the library. Does anyone have a possible solution?



https://i.imgur.com/LofAUld.jpg
Last edited by Flemming V on 14 May 2018 05:17, edited 1 time in total.
Reason: Picture removed. Forum rule 3.1
koala_pl
Posts: 6
Joined: 21 Apr 2016 10:47

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#73 Post by koala_pl » 17 Jun 2018 22:25

I do not want to open links
matt_deluca
Posts: 2
Joined: 28 Jun 2018 13:38

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#74 Post by matt_deluca » 28 Jun 2018 13:41

kasio wrote: 10 May 2018 21:04 Can someone help me?
on my lcd only the marches (letters a, b, c, d, e, f ....) appear on the first line of the lcd
I think it might be the library. Does anyone have a possible solution?



https://i.imgur.com/LofAUld.jpg
I have the same issue. Have you managed to solve it? I have found that it works with the 32bit version of the game, plugin, etc but I get the same as you when I load in 64bit

Cheers
nobbystark1997
Posts: 1
Joined: 17 Jul 2018 02:54

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#75 Post by nobbystark1997 » 17 Jul 2018 03:05

Hi there!!
I have a problem that my 7seg is interfered too much !!
Have anyone help me !!
User avatar
teknogeek1300
Posts: 32
Joined: 03 Feb 2016 05:01
Contact:

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#76 Post by teknogeek1300 » 05 Aug 2018 09:13

The 7 segments LED is my diagram is wired upside down. And not all 7 segment are wired the same.

If your servo's are cycling and the arduino restarting, you need to power the servo's externally, most servo's require 1amp per servo, arduino's usually can't handle 1amp. I recently learned this. 5v 2amp for 2 servo's, 5v 5amp for 5 servo's and so on.

Yes, COM ports above 9 DO NOT WORK. You need to change the com # in the arduino's properties through device manager. Keep it under 9. Then unplug the arduino and plug it back in to take effect.
Jevsenak
Posts: 13
Joined: 24 Aug 2015 00:54

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#77 Post by Jevsenak » 26 Aug 2018 22:03

arcannae wrote: 13 May 2016 11:53 hi,
https://mega.nz/#!PxR0RQYB!hp8ht_ZryGBe ... BcYY6v4NdE
all instructions is here ^^ there is also a ready to use arduino sketch.
Hello can you reupload the instructions. Link doesnt work after all those years. Or if anyone can tell me how o create dash_plugin.dll in VS drom source files.

Thank you.
User avatar
teknogeek1300
Posts: 32
Joined: 03 Feb 2016 05:01
Contact:

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#78 Post by teknogeek1300 » 29 Aug 2018 23:30

Jevsenak wrote: 26 Aug 2018 22:03
arcannae wrote: 13 May 2016 11:53 hi,
https://mega.nz/#!PxR0RQYB!hp8ht_ZryGBe ... BcYY6v4NdE
all instructions is here ^^ there is also a ready to use arduino sketch.
Hello can you reupload the instructions. Link doesnt work after all those years. Or if anyone can tell me how o create dash_plugin.dll in VS drom source files.

Thank you.
https://mega.nz/#!7cIyRDDJ!7Z7ItjusANVt ... HTrHyKvc0Y
Jevsenak
Posts: 13
Joined: 24 Aug 2015 00:54

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#79 Post by Jevsenak » 02 Sep 2018 20:48

Thank you very much my friend!

I am very surprised to see that there is already v6. I’m a certainly not a programmer, but more of a mechanical engineer, so these are some new waters for me to swim in. I managed to get my “cardboard” dash up and running with one servo and couple of LED’s just to see if everything works.

I’m still waiting for some more servos to arrive, (starter kit only contained one) so I can continue my project. Probably I will start editing .ino file because I want to recreate complete dashboard of MAN TGX. I’m designing it peace by peace for 3D printing so everyone with a printer and Arduino board can recreate it.

But there will probably be some obstacles that I will ran in to. I hope you can help me with some of those.

Firstly I saw that you are adding new functions to you DLL so Arduino can get more and more info from the game. I think I figure it out that everything you put at the end of plugin.CPP file can be understood by Arduino. If that is correct I am asking if you can add all the stuff that Silas has in his v2, because there are some parameters (fuel consumption for example, and in the future maybe angular velocities for condoling cockpit movement – but that just dreaming right now.)) that would come in handy to me and create new DLL (maybe v7?). I just don’t know how to build my own DLL and if adding lines in .CPP is all there is to do.

Code: Select all

  REG_COMMON_CHAN(local_scale,    float);
  REG_COMMON_CHAN(game_time,      u32);
  REG_COMMON_CHAN(next_rest_stop, s32);
  
  
  REG_TRUCK_CHAN(world_placement,               dplacement);
  REG_TRUCK_CHAN(local_linear_velocity,         fvector);
  REG_TRUCK_CHAN(local_angular_velocity,        fvector);
  REG_TRUCK_CHAN(local_linear_acceleration,     fvector);
  REG_TRUCK_CHAN(local_angular_acceleration,    fvector);
  REG_TRUCK_CHAN(cabin_offset,                  fplacement);
  REG_TRUCK_CHAN(cabin_angular_velocity,        fvector);
  REG_TRUCK_CHAN(cabin_angular_acceleration,    fvector);
  REG_TRUCK_CHAN(head_offset,                   fplacement);
  REG_TRUCK_CHAN(speed,                         float);
  REG_TRUCK_CHAN(engine_rpm,                    float);
  REG_TRUCK_CHAN(engine_gear,                   s32);
  REG_TRUCK_CHAN(displayed_gear,                s32);
  REG_TRUCK_CHAN(input_steering,                float);
  REG_TRUCK_CHAN(input_throttle,                float);
  REG_TRUCK_CHAN(input_brake,                   float);
  REG_TRUCK_CHAN(input_clutch,                  float);
  REG_TRUCK_CHAN(effective_steering,            float);
  REG_TRUCK_CHAN(effective_throttle,            float);
  REG_TRUCK_CHAN(effective_brake,               float);
  REG_TRUCK_CHAN(effective_clutch,              float);
  REG_TRUCK_CHAN(cruise_control,                float);
  REG_TRUCK_CHAN(hshifter_slot,                 u32);
  // hshifter_selector
  REG_TRUCK_CHAN(parking_brake,                 bool);
  REG_TRUCK_CHAN(motor_brake,                   bool);
  REG_TRUCK_CHAN(retarder_level,                u32);
  REG_TRUCK_CHAN(brake_air_pressure,            float);
  REG_TRUCK_CHAN(brake_air_pressure_warning,    bool);
  REG_TRUCK_CHAN(brake_air_pressure_emergency,  bool);
  REG_TRUCK_CHAN(brake_temperature,             float);
  REG_TRUCK_CHAN(fuel,                          float);
  REG_TRUCK_CHAN(fuel_warning,                  bool);
  REG_TRUCK_CHAN(fuel_average_consumption,      float);
  REG_TRUCK_CHAN(fuel_range,                    float);
  REG_TRUCK_CHAN(adblue,                        float);
  REG_TRUCK_CHAN(adblue_warning,                bool);
  //REG_TRUCK_CHAN(adblue_average_consumption,    float);
  REG_TRUCK_CHAN(oil_pressure,                  float);
  REG_TRUCK_CHAN(oil_pressure_warning,          bool);
  REG_TRUCK_CHAN(oil_temperature,               float);
  REG_TRUCK_CHAN(water_temperature,             float);
  REG_TRUCK_CHAN(water_temperature_warning,     bool);
  REG_TRUCK_CHAN(battery_voltage,               float);
  REG_TRUCK_CHAN(battery_voltage_warning,       bool);
  REG_TRUCK_CHAN(electric_enabled,              bool);
  REG_TRUCK_CHAN(engine_enabled,                bool);
  REG_TRUCK_CHAN(lblinker,                      bool);
  REG_TRUCK_CHAN(rblinker,                      bool);
  REG_TRUCK_CHAN(light_lblinker,                bool);
  REG_TRUCK_CHAN(light_rblinker,                bool);
  REG_TRUCK_CHAN(light_parking,                 bool);
  REG_TRUCK_CHAN(light_low_beam,                bool);
  REG_TRUCK_CHAN(light_high_beam,               bool);
  REG_TRUCK_CHAN(light_aux_front,               u32);
  REG_TRUCK_CHAN(light_aux_roof,                u32);
  REG_TRUCK_CHAN(light_beacon,                  bool);
  REG_TRUCK_CHAN(light_brake,                   bool);
  REG_TRUCK_CHAN(light_reverse,                 bool);
  REG_TRUCK_CHAN(wipers,                        bool);
  REG_TRUCK_CHAN(dashboard_backlight,           float);
  REG_TRUCK_CHAN(wear_engine,                   float);
  REG_TRUCK_CHAN(wear_transmission,             float);
  REG_TRUCK_CHAN(wear_cabin,                    float);
  REG_TRUCK_CHAN(wear_chassis,                  float);
  REG_TRUCK_CHAN(wear_wheels,                   float);
  REG_TRUCK_CHAN(odometer,                      float);
  REG_TRUCK_CHAN(navigation_distance,           float);
  REG_TRUCK_CHAN(navigation_time,               float);
  REG_TRUCK_CHAN(navigation_speed_limit,        float);
  
  REG_TRAILER_CHAN(connected,                     bool);
  REG_TRAILER_CHAN(world_placement,               dplacement);
  REG_TRAILER_CHAN(local_linear_velocity,         fvector);
  REG_TRAILER_CHAN(local_angular_velocity,        fvector);
  REG_TRAILER_CHAN(local_linear_acceleration,     fvector);
  REG_TRAILER_CHAN(local_angular_acceleration,    fvector);
  REG_TRAILER_CHAN(wear_chassis,                  float);
   
And here is the link to his files: https://github.com/skyhisi/ets2_dashboard_v2

And my second question is, how do I know which serial byte is connected to which truck light. (and is Truck light byte or warnig light byte) Is there any file where these numbers are written? And how those it work with servos, because there isn’t any numbering used in the brackets.
Here is the part of the .ino file I’m referring to.

Code: Select all

read_serial_byte_set_servo(speedo, SERVO_DIR_INVERT); // Speed  
  read_serial_byte_set_servo(rpm, SERVO_DIR_INVERT); // RPM
  
  skip_serial_byte(); // Brake air pressure
  skip_serial_byte(); // Brake temperature
  skip_serial_byte(); // Fuel ratio
  skip_serial_byte(); // Oil pressure
  skip_serial_byte(); // Oil temperature
  skip_serial_byte(); // Water temperature
  skip_serial_byte(); // Battery voltage
    
  
  // Truck lights byte
  serial_byte = Serial.read();
  digitalWriteFromBit(LEFT_INDICATOR,  serial_byte, 5);  
  digitalWriteFromBit(RIGHT_INDICATOR, serial_byte, 4);
  
  // Warning lights bytes

  serial_byte = Serial.read();  
  digitalWriteFromBit(PARKING_BREAK, serial_byte, 7);
  digitalWriteFromBit(FUEL_WARNING, serial_byte, 3);  
    
Hope you, or anyone else reading this can help me with my current obstacles. Thank you in advance.
alican_222
Posts: 6
Joined: 14 Nov 2017 14:47

Re: Arduino Guage Cluster/Dashboard(+ source) for ATS

#80 Post by alican_222 » 13 Sep 2018 21:04

Truck lights:

6: Parking light
5: Left indicator
4: Right indicator
3: Low beam
2: High beam
1: Brake
0: Reverse

warning lights:

7: Parking brake
6: Motor brake
5: Air pressure warning
4: Air pressure emergency
3: Fuel warning
2: Battery voltage warning
1: Oil pressure warning
0: Water temperature warning
Post Reply

Return to “General discussion about the game”

Who is online

Users browsing this forum: mopar93, oldmanclippy and 14 guests