I'm currently building a slot-car racing track with four "slots", and am hoping to use an arduino to run most of the "race control" automatically.
The bit I am unsure of is the lap counting and timing:
What needs to happen is for the arduino to keep track of how many laps each car has to do, whilst also keeping a timer going. In terms of lap counting, I plan to place an LDR embedded in the track beneath the start gantry, and have fairly bright lights placed in the gantry shining down onto the track, then, when the car passes over the line, it will block the light, and arduino will be able to register the change, and subtract one lap from the corresponding car's "laps remaining" count.
What I would really like to know is: is Arduino capable of constantly (i.e. more than 20 times a second) monitoring 4 imputs whilst simultaneously maintaining an accurate timer?
What I would really like to know is: is Arduino capable of constantly (i.e. more than 20 times a second) monitoring 4 imputs whilst simultaneously maintaining an accurate timer?
Yes. Millis is your timer and checking four LDRs at that rate is trivial for a device that runs at 16 MHz.
You'll find the 'blink without delay' example sketch useful. In the IDE, go Files > Examples > 02.Digital > Blinkwithoutdelay.