• Welcome to Kart Racing Pro Official Forum. Please login or sign up.
 
March 28, 2024, 12:09:31 PM

News:

Kart Racing Pro release13e available! :)


Hardware dash

Started by siklosi, November 08, 2011, 09:14:28 PM

Previous topic - Next topic

siklosi

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...



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...

PiBoSo


Which data do you need? In what format? Text or binary?
At which rate?
Is an initialization or a synchronization needed?

siklosi

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...

PiBoSo

November 13, 2011, 12:55:01 AM #3 Last Edit: November 13, 2011, 01:09:37 AM by PiBoSo

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?


siklosi

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...

DjFIL

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.

rich32g

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

PiBoSo

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

rich32g

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

PiBoSo

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

composite.wave

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