I have been working on a Hot Wheels track timer project for a while but got stuck with a specific part of the coding, i.e. displaying Lap Times (4 digits, seconds.milliseconds e.g: "6.971"). I have been writing the code for some time now but couldn't find any display codes example that fits my application, nor do I understand existing examples thoroughly to be able to write the display codes in the context of the project.
I'm using 4 digits of Large 7 Segment Displays with Digit Drivers, both form Sparkfun (and chained just like suggested in their hookup guide) for each track. Is there by any chance someone who is familiar with this and willing to help with some guidance or specific codes for displaying the Lap Times part?
I have also attached the code (In Word document) I have so far.
If anything, please see link below for more details on the project (originally posted in another section):
Those are meant as variables which can be tuned later on.
The first one is meant as 3 seconds minimum required time for gate to be closed (i.e. micro switch held in), before displays get reset/turned off and be ready for next race again.
The second one is the maximum race duration, in micros. Thus 10 seconds. (Lap times are measured initially in micros).
There are numerous example online for displaying the digits, but none is in the format I'm trying to display the lap times or using the digit drivers I have. I would like to display lap times in the following format (seconds and milliseconds):
For example: 6.971 (Lap times won't be greater that 9.999)
I'm actually getting the lap time with the following function (e.g. for the right lane):
RightPassTime = (micros() - StartTime);
But I think if I get help with the codes needed to display that example number, I would be able to incorporate it in the codes I have so far and refine it further to get it to work.
but none is in the format I'm trying to display the lap times or using the digit drivers I have.
Why does the format mean a thing? You are trying to display some digits. You know (or should) what digit you want to display in what position. Just do it.
As for "using the digit drivers you have", use the library that sparkfun provided/linked to.