Arduino suitablility for a project

This is an interesting toy... Even if I won't have the pleasure to work on it, I'll throw in some ideas hoping to say something useful...

  • pc sends a "start race" command to the arduino, telling it how long it will last (number of laps or max running time) and which lanes will participate;
  • ardunio turns on the power
  • in "race" mode the arduino doesn't communicate with the pc, it just executes a tight loop where polling for the 4 lanes occurs. Lap counts and timings (possibly via micros()) are kept in memory;
  • at the end of the race, the arduino turns off the power and sends race stats to the pc, which then stores them into the race system software.

Not having serial communication during the lap could increase the time resolution and avoid the burden of developing a fast and robust protocol.

As for int vs. polling, I'd use a hybrid solution: an interrupt tied to each lane; each isr just increases a volatile variable which keeps count of total laps; during race, a tight loop keeps watching those lap counts to see if they increase; when that occurs, the current value of micros() is stored into an array; at the end of the race, the four arrays are transmitted to the pc, which then reconstructs the race history.

As I said, just my 2 cents.

HTH