Next in the series of ongoing tutorials for the beginner from the Arduino LEGO Trains YouTube channel is a neat explanation of how to use inexpensive infra-red LEDs as sensors to detect trains as they approach a set of points (switches for US readers) and then change them as required along with train motion to avoid an accident.
We like how two trains can be automated on the one example layout, including automation of the points, signals and how these have been implemeted using an Arduino "state machine". This video shows the true strength of using an Arduino or compatible board for more serious applications:
The sensors used in the demonstration can also be used for other applications, such trackside detection or adding collision-avoidance to other devices. For more interesting LEGO train videos, subscribe to their YouTube channel. And for more, we're on twitter, facebook and Google+, so follow us for news and product updates as well.
If you're looking to learn about Arduino development platform and how it interacts with external devices such as ultrasonic distance sensors - you can't go past "Arduino Workshop - A Hands-On Introduction with 65 Projects” by John Boxall.
Arduino Workshop takes the reader from having zero knowledge about the Arduino platform, electronics and programming and leaves them with the know-how and instructions on everything from blinking an LED, to robotics, wireless data, cellular communications, motor control, sensors, Internet connected systems and more. For more information including a sample chapter and table of contents, visit the book page.