Ideally there are 6 things that should be identifiable:
1) Total time from start to finish in Lane 1
2) Total time from start to finish in Lane 2
3) Differential of start times
4) Differential of finish times
5) Who won by crossing finish line first
6) Who won taking differential of starts into consideration
Raw numbers would then be delivered to some type of web API. Probably a REST over HTTP endpoint via a JSON POST. Something like:
{
lane1Start: 0.000, // First lane to start would always be 0.000
lane2Start: 0.001, // Lane 2 started 1 micro-second after Lane 1
lane1Finish: 30.034, // Lane 1 took 30.034 seconds to move from 0.000 to finish
lane2Finish: 30.025 // Lane 2 took 30.025 seconds to move from 0.000 to finish
}
So, I'm curious, does anyone think that the ESP8266 has a high enough resolution timer to do this? Considering its really just recording 4 points in time and then delivering them back to a host.
Two points are an absolute must (finish line differential between the two).
Could there be more than 4 points sampled?
Would I need to use assembly/C or could it be done in Lua?
I'm guessing some type of interrupt would need to be used. Each signal running one of the input pins, trigger on those signals going high/low.
Could I measure the amount of time the signal was high/low? Would be really cool since from that you can calculate rough speed (length of car is ~6ft, so amount of time 6ft took to cross sense should give rough idea of speed).
Any help greatly appreciated,
- Jeremy