Nice! That another project I had in mind. Did a little bit of working on the timing calculation, but I didn;t have any suitable IR sensors - just ordered some. I do have an I2C 4 digit LED, although there are enoug pins to just multiplex one of the other ones I have that doesn't have the driver.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
I created a scale speedometer that uses two IR sensors between the rails, and when a train travels over the sensor. the IR light is reflected back to the integrated photosensor. This starts a timer. When the train crosses the second sensor, the timer is stopped, and the distance vs time multipied by the scale reads out the scale speed on a 7 segment display, conveiently monted through the side of a scal shipping container on the layout. It's a big hit with visitors, and helps us calibrate our dcc engines.
Steve Spence
KK4HFJ (Ham Radio)
http://arduinotronics.blogspot.com