Both the Arduino and the PC side software are now updated to process the speed and RPM signals coming from Live For Speed.
What's interesting, is that the Arduino (ATMega1280) being single-theaded, I had to write all the code in one function. So, there is only one thread which reads data from the serial port, and as soon as a complete package is received, it updates the control lights and speed / RPM signals.
The speedometer and rev counter are fed with clock signals, whose frequencies vary according to the speed / RPM to be displayed on the dial (the actual speed and RPM sensors on the real car read their values from the rotating wheels/engine crankshaft, thus sending clock-like signals to the instrument cluster). These signals are generated by means of two dedicated timers, also implemented in the same single thread.
Here's a video of the real thing working in LFS.
Tuesday, April 6, 2010
Subscribe to:
Post Comments (Atom)
This is awesome. Can't wait to see the finished project.
ReplyDeleteI am really interested in the sourcecode, would you mind posting it, too ?
ReplyDeleteOh man I thought about this a while ago, after I obtained a spare Holden Commodore VP dash cluster... I'd love to look at how you did this!!
ReplyDeleteIt just beautiful man,
ReplyDeleteI admire what you did!
Yes, amazing idea.. really a good idea. when your done if you would post the source code. it would be much appreciated!! <3<3<3<3
ReplyDeleteI would love some more information on how you did this. I just so happen to have a spare 7 series instrument cluster that I would love to get working for something like this :)
ReplyDeletenice work but you shouldn't redline the car until its warmed up at least... gauge cluster shows its 0!!!!
ReplyDelete"the Arduino (ATMega1280) being single-theaded, I had to write all the code in one function"
ReplyDeleteCan you rephrase this at all? At the moment it doesn't really make sense
Hi there, Alex!
ReplyDeleteGreat work, man!
I´m currentlich working on an likewise project and was wodering if you could send me your code to get the data out of LfS to the Arduino (I´m using a Duemilanove).
Kind regards, Tomasz
my email: schmiest@fh-trier.de
Great Blog you got here Alex,
ReplyDeleteLike many of the other commenters I would be grateful if you would post the source code.
I am thinking about using the Arduino to control a stepper motor using this kit: http://www.electronickits.com/kit/complete/motor/ck1402.htm and to send tacho pulses via a simple levelshifter to the rpm gauge of a BMW 2002 instrument cluster from 1973.
feel free to send the source to my email: xillur(at)hotmail.com
Regards
Kristian
I too would be interested in the code you used, specifically to drive the gauges. I just pulled some electronic gauges out of a junkyard today with a similar project in mind, and any help would be greatly appreciated.
ReplyDeleteAwesome job on the project so far. Nothing cooler than combining computers and car parts :)
I´m making an project like you on my school project.
ReplyDeleteHall that I need is the program code that you use to program the ardoino ande the software to make that work whith the game please contact me .
bruno.newtec@gmail.com
LFS_External/OutGauge to get data from lfs and serialport1.write to send data to arduino (c# or vb.net)
Deletemrmaxx93@hotmail.com
also in arduino i use tone() to send rpm and speed signal to cluster
DeleteIF you could send us the code and the schematics it would be a good idea for me for practicing electronics and arduino programming as i´m learning
ReplyDeleteGreat Job done your content is very help full.
ReplyDeletesuper glue manufacturing pakistan