ONE:
What you can do is use a while loop waiting for the first pulse and then wait until the last pulse, for an idea look at this code from Gadjet, he made a chronograph with a similar operation, you would just need to adapt the design, this might not be as accurate for an 1". Also it will be the issue of having ties between cars. This is short as I don't like this option.
TWO:
Another option, although using what you don't want to use, would be using the interrupts on the Arduino. I am basing the following on the fact that you are using two cars.
What you can do is have a finish line
for both vehicles and detect a break with a interrupt, one interrupt pin per lane(UNO has to interrupts).
The trick here is that you place both the outputs from one lane onto a single interrupt pin with a edge detector type of circuit circuit 1 to generate a pulse while the vehicle crosses a point, especially important as it will be in the inch area for a while. The code handles the double pulse on one pin. I know this works as I used this on a ballistic chronograph which works in microseconds detecting shots >2000fps over a 0.406 foot distance.
1 This is an example of the circuit you would use at the output of each sensor before the OR gates: enter image description here
The hardware would just become a duplicate for each lane, and to combine the input on one pin you can use an OR gate IC or you can use diode OR gate: from ee.se
Interrupts are actually easy to use with Arduinos, and there are a lot of examples out there.
Have a look at the below flow chart to get an idea of operation in the code:
A small thing would be that the code ignores a interrupt once the cars have passed so it doesn't calculate a second time.
ONE:
What you can do is use a while loop waiting for the first pulse and then wait until the last pulse, for an idea look at this code from Gadjet, he made a chronograph with a similar operation, you would just need to adapt the design, this might not be as accurate for an 1". Also it will be the issue of having ties between cars. This is short as I don't like this option.
TWO:
Another option, although using what you don't want to use, would be using the interrupts on the Arduino. I am basing the following on the fact that you are using two cars.
What you can do is have a finish line
for both vehicles and detect a break with a interrupt, one interrupt pin per lane(UNO has to interrupts).
The trick here is that you place both the outputs from one lane onto a single interrupt pin with a edge detector type of circuit 1 to generate a pulse while the vehicle crosses a point, especially important as it will be in the inch area for a while. The code handles the double pulse on one pin. I know this works as I used this on a ballistic chronograph which works in microseconds detecting shots >2000fps over a 0.406 foot distance.
1 This is an example of the circuit you would use at the output of each sensor before the OR gates: enter image description here
The hardware would just become a duplicate for each lane, and to combine the input on one pin you can use an OR gate IC or you can use diode OR gate: from ee.se
Interrupts are actually easy to use with Arduinos, and there are a lot of examples out there.
Have a look at the below flow chart to get an idea of operation in the code:
A small thing would be that the code ignores a interrupt once the cars have passed so it doesn't calculate a second time.
ONE:
What you can do is use a while loop waiting for the first pulse and then wait until the last pulse, for an idea look at this code from Gadjet, he made a chronograph with a similar operation, you would just need to adapt the design, this might not be as accurate for an 1". Also it will be the issue of having ties between cars. This is short as I don't like this option.
TWO:
Another option, although using what you don't want to use, would be using the interrupts on the Arduino. I am basing the following on the fact that you are using two cars.
What you can do is have a finish line
for both vehicles and detect a break with a interrupt, one interrupt pin per lane(UNO has to interrupts).
The trick here is that you place both the outputs from one lane onto a single interrupt pin with a edge detector type of circuit 1 to generate a pulse while the vehicle crosses a point, especially important as it will be in the inch area for a while. The code handles the double pulse on one pin. I know this works as I used this on a ballistic chronograph which works in microseconds detecting shots >2000fps over a 0.406 foot distance.
1 This is an example of the circuit you would use at the output of each sensor before the OR gates: enter image description here
The hardware would just become a duplicate for each lane, and to combine the input on one pin you can use an OR gate IC or you can use diode OR gate: from ee.se
Interrupts are actually easy to use with Arduinos, and there are a lot of examples out there.
Have a look at the below flow chart to get an idea of operation in the code:
A small thing would be that the code ignores a interrupt once the cars have passed so it doesn't calculate a second time.
ONE:
What you can do is use a while loop waiting for the first pulse and then wait until the last pulse, for an idea look at this code from Gadjet, he made a chronograph with a similar operation, you would just need to adapt the design, this might not be as accurate for an 1". Also it will be the issue of having ties between cars. This is short as I don't like this option.
TWO:
Another option, although using what you don't want to use, would be using the interrupts on the Arduino. I am basing the following on the fact that you are using two cars.
What you can do is have a finish line
for both vehicles and detect a break with a interrupt, one interrupt pin per lane(UNO has to interrupts).
The trick here is that you place both the outputs from one lane onto a single interrupt pin with a edge detector type of circuit 1 to generate a pulse while the vehicle crosses a point, especially important as it will be in the inch area for a while. The code handles the double pulse on one pin. I know this works as I used this on a ballistic chronograph which works in microseconds detecting shots >2000fps over a 0.406 foot distance.
1 This is an example of the circuit you would use at the output of each sensor before the OR gates: enter image description here
The hardware would just become a duplicate for each lane, and to combine the input on one pin you can use an OR gate IC or you can use diode OR gate: from ee.se
Interrupts are actually easy to use with Arduinos, and there are a lot of examples out there.
Have a look at the below flow chart to get an idea of operation in the code:
A small thing would be that the code ignores a interrupt once the cars have passed so it doesn't calculate a second time.