Kart Racing Pro Official Forum

Mods => Plugins => Topic started by: siklosi on November 08, 2011, 09:14:28 pm

Title: Hardware dash
Post by: siklosi on November 08, 2011, 09:14:28 pm
Hi,
today in my mailbox arrived some hardware that I ordered while ago to play with, and since Im lately hooked on KRP as soon I took it in my hand I realized that it's ideal for KRP :)
Item's that arrived are Arduino Nano ( http://www.dealextreme.com/p/arduino-nano-v3-0-81877 ) and 8 digit Display, 8 LEDs and 8 Buttons combo (http://www.dealextreme.com/p/8x-digital-tube-8x-key-8x-double-color-led-module-81873) both items are relatively cheap (19 euros both and it's free shipping). This is how it could look...
(http://siklosi.users.sbb.rs/photo1.jpg)
(http://siklosi.users.sbb.rs/photo2.jpg)

Thing is that Im not a programmer but I could make Arduino side of program (Arduino is basically micro-controller with usb to serial onboard. When plugged to PC it's shown in control panel as standard serial port). There should be some plugin for KRP (dll) that would send data to serial port.  If someone is willing to help with this "project" it would be great...
Title: Re: Hardware dash
Post by: PiBoSo on November 08, 2011, 09:32:31 pm

Which data do you need? In what format? Text or binary?
At which rate?
Is an initialization or a synchronization needed?
Title: Re: Hardware dash
Post by: siklosi on November 08, 2011, 10:26:56 pm
Thing is that there is no software on mcu side... so we can decide anything we like... What I was thinking is that 8digit display could be "separated" on two parts so that two values could be displayed and buttons could be used to switch between various values. Temperatures, speed, lap time, gear.  Many things could be calculated and done on mcu side like lap time calculation's (lap difference etc...). Things that should be sent beside telemetry values are maxrpm  (LED = rpm / (maxrpm/8))... any ideas and suggestions are welcome... .Sending data should be binary. There could be some header to recognize start of packet like in this example...

const char HEADER       = 'S';
const int  TOTAL_BYTES  = XXX 
  if ( Serial.available() >= TOTAL_BYTES)
  {
     if( Serial.read() == HEADER)
    {...


Refresh rate... I don't have any idea... I guess everything above 25hz would look smooth... but timing is not crucial since mcu will spend most of time only waiting for serial data. Serial port could be set at 38400.


If anyone decides to buy same hardware just a note that programming arduino doesn't require any additional programmers it's all done over same cable... and if some update is made to arduino software it can be update very easy...
Title: Re: Hardware dash
Post by: PiBoSo on November 13, 2011, 12:55:01 am

The idea is to write to serial port a 5 bytes "header" at startup, and then 1 byte for each packet, followed by data.
Can Arduino read 32bits integers? Does it need little-endian or big-endian data?
Title: Re: Hardware dash
Post by: codeking on November 13, 2011, 07:28:29 pm
You can always use Plug&Play solution from http://raceboard.simracing.pl/ (see http://forum.kartracing-pro.com/index.php?topic=1097.0)
Title: Re: Hardware dash
Post by: siklosi on November 14, 2011, 04:38:30 pm
I could but price is 99euro's  and nano + display on dealextreme are 19euro's... I had some program that I made for simbin games while ago that used lpt port and modified so this is how it work's now...

http://www.youtube.com/watch?v=-J0EYoFlqcA

I can also change what's displayed using 8 buttons... engine/tire temperatures, best and last lap times, current time...
Title: Re: Hardware dash
Post by: DjFIL on July 28, 2012, 10:02:12 pm
Wow... this looks really awesome.  It's sweet that the main LED component is built ready to go.  Can I get a status update?  How many games do you have this working in... any luck with iRacing and/or Live For Speed?

Thanks.
Title: Re: Hardware dash
Post by: rich32g on May 15, 2013, 11:19:19 am
I have this working in iRacing. Here is a video. I am more than happy to share the Code and client for it to work there. Has there been any progress for it to work with KRP?
I'm new here, so not sure how it all works here.

http://www.youtube.com/watch?v=zSbLQQYnKLw
Title: Re: Hardware dash
Post by: PiBoSo on May 15, 2013, 12:03:31 pm
Quote from: rich32g on May 15, 2013, 11:19:19 am
I have this working in iRacing. Here is a video. I am more than happy to share the Code and client for it to work there. Has there been any progress for it to work with KRP?
I'm new here, so not sure how it all works here.

http://www.youtube.com/watch?v=zSbLQQYnKLw


Info about data outputting:
http://forum.kartracing-pro.com/index.php?topic=6.0
http://forum.kartracing-pro.com/index.php?topic=620.0
Title: Re: Hardware dash
Post by: rich32g on May 15, 2013, 12:34:22 pm
Thanks, Piboso. I've never written a DLL so will have to look in to it. A user on iRacing had created one so I just used that for that sim.

Then again, I'm probably misunderstanding what you're linking me to  :o
Title: Re: Hardware dash
Post by: PiBoSo on May 15, 2013, 02:39:48 pm
Quote from: rich32g on May 15, 2013, 12:34:22 pm
Thanks, Piboso. I've never written a DLL so will have to look in to it. A user on iRacing had created one so I just used that for that sim.

Then again, I'm probably misunderstanding what you're linking me to  :o


If you don't want to write a DLL then the proxy plugin may be useful:
http://forum.kartracing-pro.com/index.php?topic=620.0
Title: Re: Hardware dash
Post by: composite.wave on January 22, 2015, 07:32:56 pm
I'm purchasing the arduino ware this week. As of last night the total in usd was not more than 25$.  This is a fantastic innovation.  I wonder is the creator still around?  Has anyone else built one for krp?  Will it or can it be programmed to display shifter data such as gear selected and revs?   Thanks