The game Euro Truck Simulator 2 (ETS2) has a telemetry API to allow plugins access to the data about the in-game vehicle. I've created a plugin to send the data down a serial port to an Arduino microprocessor, which then controls the servos, LEDs and an LCD screen.
This initial prototype is made from cardboard, with the components just pushed through from the back.
This is the back of the dashboard, showing the Arduino board (blue) connected to the other components.
Video of it working is here:
Update:
You can download a copy of the plugin source and a pre-built plugin here:
http://downloads.silasparker.co.uk/ets2_dashboard_v3.zip (New version of code)
The code is now up on Github here: https://github.com/skyhisi/ets2_dashboard
Photo of final device made from MDF, the paint finish is terrible in bright light !
Video of how it works it here:
Update:
Fixed plugin built in wrong mode. Note, you may also need to install the Visual Studio 2010 Re-distributable package from here: http://www.microsoft.com/en-gb/download/details.aspx?id=26999
hello i like your dash can you send me the plugin??
ReplyDeleteHi, I've updated the post to include a link to the source and a pre-built plugin for Windows.
Deletethanks you so much!
DeleteHi, i can not make it work in 64-bit, you can help me?
DeleteHello I love the dash but I need the pinout of display, servos,leds... Thx.
ReplyDeleteHi, you can see the pins used at the top of the arduino_controller.ino file in the source download zip. It doesn't matter too much what pins you use, it's sometimes easier to just wire it up and then change the software to match.
DeleteThank you very much for your answer
Deletecan you crate a readme file or something explaining how to get your patch installed? as tried a couple of other videos, they show the system working with the Audrino, but when I tried with my Audrino then it doesn't seem to work with the servo's.
ReplyDeleteHi, to install the software on the Arduino, use the normal Arduino IDE to flash the board. For the plugin you should be able to just put the pre-built DLL into the plugins folder.
DeleteTo test the connection, wire up an LED (with resistor) to the indicator pins and use the indicators in the game. If the indicators work but not the servos, then the servos aren't compatible with the standard Arduino library. If the indicators don't work, then check the game log file (%USERPROFILE%\My Documents\Euro Truck Simulator 2\game.log.txt) for error messages, the Arduino must be on COM port 3.
you could show video where are placed the files from your download. His dash is very cool
ReplyDeleteThe DLL needs to go in the plugins folder (this is normally C:\Program Files (x86)\Steam\steamapps\common\Euro Truck Simulator 2\bin\win_x86\plugins).
DeleteThe ino file needs flashing to the Arduino.
The other files are the source code for the DLL in case you want to add more features.
Silas Parker,I made myself this prototype using stepper motors. If you want to get more information (eg light, temperature, fuel level, etc. etc.) What should I do? Thank you for your work.
ReplyDeleteHi Antonio, I've uploaded a new version of the code that I hadn't yet made public. It's the v3 file linked to in the post. This new version provides much more information through to the Arduino board.
DeleteYou will need modify the arduino_controller.ino file to use more servos or LEDs, there is a new function in the code (read_serial_byte_set_servo) to make it easy to control more servos, see line 148 for an example.
You may also need change and rebuild the plugin, which can be done by editing and running the build.bat file from the Visual Studio 2010 command line.
Hope this helps.
How would i make more warning lights like if lights are on or off, or high beam on or off
Deletethanks again, now I'm changing my project with the version of the three. Later, if you want to send the video of my project.
ReplyDeleteDear Silas Parker v3 plug-in I can not get it to work. The computer does not send telemetry to Arduino. I also tried to build the plugin as your advice but nothing. Thank you.
ReplyDeleteHave you also installed the options file ? I've posted the code on Github now with some instructions and a troubleshooting guide here: https://github.com/skyhisi/ets2_dashboard
DeleteDear Silas Parker, i had not actually copied the files in the folder, now it works perfectly. Thank you again.
ReplyDeleteFirst of all, thanks for your work!
ReplyDeleteEnglish is not my main language.
I have 2 questions.
I have a real bus's dashboard and i've tested the speedmeter and rpm meter.
Rpm meter works fine, but speedmeter that i have, the maximum speed is 165km/h.
So the range of speed is different and it did not match up.
I tried modify your arduino script, but i have no idea.
Can you tell me the modifying point of script?
the second question , I wanna make every gauges (like a voltage, temp, air pressure and etc) move.
Can you make another version that all data moves with servo?
Thanks again
In version 3 of the code, most of the dashboard dials and lights are sent to the arduino, including battery voltage, air pressure, temperature.
DeleteVersion 3 of the plugin also has an options file "dash_plugin.txt" that allows you to easily scale the values sent to the board to adjust the servo range.
thanks to your reply
Deletei've studied your script and made my dashboard!
http://www.youtube.com/watch?v=94zAlCzbNE8
thanks again!
Nice video, your dashboard looks great :)
DeleteHello!
ReplyDeleteI would like to ask you, what type of servo can I use for dashboard?
Thanks
You can use any standard model servo (http://en.wikipedia.org/wiki/Servo_%28radio_control%29) that can be controlled by the Arduino Servo library. I used micro servos like the one here: http://www.hobbytronics.co.uk/hd1800a-micro-servo
DeleteHi
ReplyDeleteHow connect LCD to arduino? How do I hook up the LCD pins for Arduino (12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2)
for example LCD pin D4 connect to pin 12 in arduino
Thanks
This is using the standard LiquidCrystal library, just connect it up as described here: http://arduino.cc/en/Reference/LiquidCrystalConstructor
DeleteYou can use any of the variations if you want to connect up fewer pins.
Is there any advantages or disadvantages in using less pins?
DeleteIf you only use 4 data pins (rather than 8) it will take twice as long to write to the LCD screen. This probably won't be a problem, as the refresh rate in the plugin is only 20 FPS, but if you notice any screen errors or slow response you might need to use 8 data pins.
DeleteI have got two servo motors but when i plug them on my arduino they start spinning around. Maybe you could point me to what may be wrong?
DeleteThey are probably continuous rotation servos, you will need to use 'standard' or positioning servos.
DeleteExcellent plugins, how fabulous it is
ReplyDeleteThanks for it :D
Glad you like it :)
DeleteDo I need any special module to communicate with the game? My arduino board is Arduino Duemilanove w/ ATmega168, and how to find where is COM3 of my computer?
ReplyDeleteYou need to install the DLL for the game into the plugins folder and load the software on the Arduino. The COM port is the one that you select within the Arduino IDE for programming. If the COM port is different on your computer, you can change it in the dash_plugin.txt options file.
DeleteThanks! Finally it works, thank you so much!!!
DeleteGood afternoon. Tell me, in your project may be used instead of the servo PWM?
ReplyDeleteI have a couple of questions about this.
ReplyDelete1) How did you make it talk with the game and is it possible to use with other games?
2) How much power did it use?
3) Can you use multiple LEDs for different things? (Like low fuel warning, air pressure etc)
4) Is the LCD necessary?
This seems like an amazing project which I'm going to end up making after I make my H shifter.
This uses a plugin for ETS, so it might be able to work with other games but you would need to create a plugin or mod for the game.
DeleteI don't think it used much power, it was running off the USB port which is limited to 500mw, the servos probably use the most power, but they aren't loaded so the current draw won't be too high.
You could add more LEDs, the plugin and Arduino program have been extended to support the warning lights.
The LCD isn't necessary, but I wanted something to give a precise readout so I could drive exactly on the limit and not trigger the speed cameras :)
My servos sweep backwards from right to left instead of left to right. Any idea how to get them to go the other way? Im speaking about the speedometer and tachometer. Thanks
ReplyDeleteIn the read_serial_byte_set_servo calls, change SERVO_DIR_INVERT to SERVO_DIR_NORMAL
DeleteWelcome Sorry for the language but I write with google translator. I have a few questions about your project dashboard to ETS2. Is this project works on 1.16? Overall, for me it does not work. I will explain to you what I did
ReplyDeleteI plugged one servo to arduino Mega, to the port A0. Uploader script to the arduino. I changed the build.bat, because I have Steam on another drive. I copied it to the plugins folder and it does not work.
If you have time please help me
tank you for this plug-in ^^
ReplyDeletei have a question
how can i increase the refresh rate ? for exemple 50 FPS instead of 20 actually?
You could increase the refresh rate by editing the plugin, but it isn't a great idea as it will slow the game down as the serial transfer will take too long. To support higher rates the plugin needs rewriting with a separate thread for the serial communication.
Deletedoes not run on ETS2 mp 64 bit. and in the single player works ok
Deletedoes not run on ETS2 mp 64 bit. and in the single player works ok
Deleteis there any chance you can make a 64 bit version?
DeleteGood afternoon.
ReplyDeleteCan you see your project, but instead was a servo PWM? Then you can connect devices a real car.
Servo turning the wrong way!
ReplyDeletecan i change the code to edit the direction the servo turns?
can i use steppers on aitpressure, turbo, oil etc? i have the dash of an VOLVO FH truck
thanks!
Is there any way to send the code to arduino without close ETS2? If I try do it with the game running, it just don't work. Close it every time really sucks..
ReplyDeletehello, i have problem: ets doesn't detect arduino leonardo on port COM10. here is part of log 00:00:10.296 : loading 'dash_plugin' 'E:/SteamLibrary/steamapps/common/Euro Truck Simulator 2/bin/win_x86/plugins/dash_plugin.dll'
ReplyDelete00:00:14.641 : Plugin initialising
00:00:14.641 : Plugin CWD: E:\SteamLibrary\steamapps\common\Euro Truck Simulator 2\bin\win_x86
00:00:14.642 : Using serial port: COM10
00:00:14.642 : Can not open COM port
00:00:14.642 : 'dash_plugin' failed initialization with result 0xfffffff9
How to put three or more LEDs for RPM. it is very difficult ? I used the google translator :)
ReplyDeleteGood morning I'm basing myself in your project to set up a panel to me and I'm doubts about how I change the information that appears on the display and also wanted to make the gear indicator in two display 7 sec ! Thank you for taking the project and help us to ride Thank you !
ReplyDeleteI have looked into your code, but i can't figure out how the rpm and speed servo get the data from?
ReplyDelete- And if i wan't the fuel ratio, should i just type "read_serial_byte_set_servo(FUEL, SERVO_DIR_INVERT); " Or wouldn't that work??
How can i see which bit is from the game, like the long_beam, engine_enable and so on?
ReplyDeleteI know the blink_indicators, but how to figure it out?
And if i wan't to add a third servo, ex the fuel_ratio will i then just use this line?
"read_serial_byte_set_servo(fuel, SERVO_DIR_INVERT);"
I can't seem to figure out, where the servos get the data from.
Sorry im a novice to arduino.
This is an awesome project! Well done!
ReplyDeleteIt inspired me to control a real dashboard which is controlled via CAN Bus.
See here: https://hackaday.io/project/6288-volkswagen-can-bus-gaming
Hi! I've just downloaded your plugin and it seems not to work properly. When I choose my profile, the loading takes so much time and after it the only thing I can see is a cursor. Whole game freezes. If I disconnect Arduino then, everything starts working. I've already checked log file, all looks fine, plugin is loaded. Could you help me with it? :)
ReplyDeleteHi I have been following with the theme box ETS2
ReplyDeleteAnd I would make a couple of questions
I use Arduino Mega to add more LEDs and servos
1 might add switches! the same program and badge?
2 And though can you give me an example
Thank you
Hi Mate,
ReplyDeleteCould you please help me with some code ? i have been making a replica of the default MAN ETS 2 truck dash ,Now the TFT LCD sheild i have i want it to display the same info as the in game LCD is this possible .any help would be greatly appreciated
Dear Silas, would it be possible to use your plugin to sync my flip switch positions with Arduino and ETS2? I'm building a home cockpit with Toggle switches and I'd would like to sync the in game switches (like light switches and ignition etc) with my hardware at startup.
ReplyDeleteThanks in advance for sharing
Dear Silas, would I be able to use your plugin to sync Hardware switch-positions with the ETS2 game upon start?
ReplyDeleteerror please help me.
ReplyDelete00:00:23.427 : Error reading settings file: C:\Program Files (x86)\Steam\steamapps\common\Euro Truck Simulator 2\bin\win_x86\plugins\dash_plugin.txt
00:00:23.427 : 'dash_plugin' failed initialization with result 0xfffffff9
How to addapt the plugin to display four lines of text on a 20x4 LCD?
ReplyDeletenow I have a new Mercedes, and there is control of lifting / lowering axis. if there is the possibility of adding to the program the Arduino. please help.
ReplyDeletePlease post the electronic schemematic of connection of the Components Arduino board
ReplyDeleteHow i can add lights for like high beam and other warning lights
ReplyDeleteHi! Im planing building a dashboard like this. I Just need to buy the leds, the adruino and the servos. But I want to know if it is possible to have one servo for rev burner, one for speedo and another one for fuel?
ReplyDeleteI will use it in a real dashboard! Its possible to mach the servo with the dashboard paper?
Thank you in avance!
tanks you ! here is what i did with your plugin :D https://www.youtube.com/watch?v=D1OmAtDfw7A great tanks to you ^^ is possible to convert the plugin to work with 64bits version of ets2 ? if yes how ? ^^
ReplyDeleteHi, I can not make it work in 64-bit, you can help me?
ReplyDeleteHello I have downloaded all the files and instructions to install but I have a problem to me the .dll file . It will receive data on the Arduino from the game. In the game.log.txt I have an error
ReplyDelete(00:00:02.413 :loading 'dash_plugin' 'E:/Spiele/Steam/steamapps/common/
Euro Truck Simulator 2/bin/win_x64/plugins/dash_plugin.dll'
00:00:02.422 : unable to load: 000000C1 )
My ETS2 version is 22.2.8
is the dll not compatible ?
where can I get a current dll ? with virtual studio I know my way not to create a you. hope it can be helped .
Hello,
ReplyDeletethe plugin is very good, but I have two questions.
I wanted to put an LED for parking lights
in the lcd wanted to change the MPH in RPM
how can I do it?
Hello a question there is the dll even for 64 bit versin of ETS2?
ReplyDeleteHi, I made my own dashboard few years ago and everything was perfect that time.
ReplyDeleteAfter that I played a bus simulator called OMSI2 for several years.
Nowadays, I come back to ETS2 and upload sketch as you introduced to test dashboard with ETS2.
And I got a problem. I recorded a video.
https://youtu.be/vAtZ_n8wJP0
the servo moves correct value but it vibrate. I googled this phenomenon it called buzzing or shaking.
Do you know how to solve this problem?
Hello Silas, I use the very time their api for ETS2 and I find incredible the work that you did with it, I wonder if you would like to upgrade it to 64-bit, because when I play multiplayer ETS2 its api It does not work, because now the multiplayer is only on 64-bit
ReplyDeletehey there bud giving this ago with a arduino mega and when i upload the INO i get an error saying 'A8' was not declared in this scope the first part of it looks like this in the one i have modified
ReplyDelete#include
#include
const int SPEEDO_PIN = A1;
const int RPM_PIN = A0;
const int LEFT_INDICATOR = A5;
const int RIGHT_INDICATOR = A8;
const int PARKING_BREAK = A6;
const int HIGH_BEAM = A9;
const int ENGINE_BREAK = A7;
const int LOW_AIR = A4;
hi there i made a cluster using a vr/vs commodore cluster. works fine with an arduino mega r3, just wondering if it is possible to knock up a 64bit version for ATS, if so would you either be able to create one or send me in the right direction in making a plugin and DLL.
ReplyDeleteCheerz
Hi
ReplyDeleteFirstly thanks for all the info you have given and all the work you have done.
Quick question if I may. I bought two Etronix servos when I have them attached and power on the adruino it spins the servos then power cycle. I initially thought it may have been drawing too much power from the USB but I have since used a Powered USB port and its still doing the same. Any ideas?
Hi is it possible to changt the KPH to RPM on the LCD display
ReplyDeletehello
ReplyDeleteI'm trying this out but I'm having trouble with the Telemetry plugin, I made sure the arduino was on COM3 and that I have the 32-bit version running. Copied the files exactly as you explained but still not working, no communication between the plugin and the Arduino.
Should I already have something pre-installed for the plugin to work or what am I doing wrong, I followed every step and watched multiple YouTube videos but nothing worked.
Kind regards
Hi Silas, thank you for creating this amazing plugin. I have a single question. I saw that you explained to someone how to add more gauges such as the fuel gauge, but I didn't really understand it. I understand that there is the line "read_serial_byte_set_servo", and underneath that there is one that says "skip_serial_byte" What line do I put in to add a fuel gauge. Also, is this all I have to add or do I have to edit more of the code? Thanks!
ReplyDeleteHi Silas, thank you for creating this code for everyone to use. I have one question that I'm confused about. I don't know much about coding, so how do I add in your program to control a servo as a fuel gauge? Thanks!
ReplyDeleteHey Silas. This is just great Work you have done. About the Visual Studio 2010 Re-distributable is for win 7 as i can see. how dos it Work for win 8.1 ? i see that the file not suportet for the Windows 8.
ReplyDeletethanks for this..
ReplyDeletebut i have a problem. in game.log.txt there is an error : "can read com13"
I have changed COM3 to COM13, because to Arduino used COM13 on my PC.
any solution?
hi,
ReplyDeletetank you for this plug-in/
do you have plug-in for ats(american truck simulator)?
Hello English is not my forte.
ReplyDeleteCongratulations on your very beautiful work.
I'm using V3 http://downloads.silasparker.co.uk/ets2_dashboard_v3.zip (New version of code).
When I call read_serial_byte_set_servo (brake_air, SERVO_DIR_INVERT); // brake air the led flashes left to stop. Could you give us a hint?
Hello,
ReplyDeletenice plugin so far.
But how do i change something.
For example: in the Arduino file there is the HighBeam, i want to shoe LowBeam also. How can i do this.
Thanks for your help.
Hello,
ReplyDeleteI have problem with plugin. When I start the game and load my profile, the game freezes and i have to restet my arduino to unfreeze it. When i turn my indicator arduino desn't turn led on.
Hello, How can I add more dash lights to the code and how can i use the actual dash indicatos instead of servos?
ReplyDeleteThank You.
Someone has the assembly scheme, I'm having difficulty getting the lcd to work
ReplyDeleteHi Silas,
ReplyDeleteI hope you see the message...
First of all, congratulations for this awesome project and thank you for providing it for free.
I've been assembling it and there's something I'm not sure about.
How could I add the fuel and others gauges?
Thank you in advance!
Hello, I just noticed this, in ur rig u have a turn signal lever. Did u get that from a specific seller or is it just from the dashboard?
ReplyDelete