Arduino source code for automating a Lego train railroad using LittleBits. This is my entry in the LittleBits Bitify Your City contest.
There are two Arduino sketches here. One is for a railroad crossing with blinking lights and gate, and the second is for a train station where the train stops for a few seconds then starts up again. Both use light sensors to detect the train.