Fun with Arduino - a Series of Introductory Videos [external source]

There are several ways to do train detection, like sensing rail current, or a magnet under the train that triggers reed switches along the track, or with an optical sensor. The latter is used in this video, only because I had some TRCT5000's lying around and they were easy to setup for a demo. As soon as we have them working, we have some fun with them by making a train speed measurement device.

Fun with Arduino 19 Railway Crossing Train Detection with Optical Sensor