Legendary Lego 7866 level crossing automated by Arduino

36m ago



We all know (at least if you're born before the '90's) the legendary 12V Lego 7866 level crossing with remote control. Using two sensors, I've automated the level crossing with an Arduino Uno. Both sensors are connected to the Arduino and generate an interrupt when a train passes. This makes the Arduino steer the bars down, using a L293D motor driver. Two seconds later, the bars come up again. Since the sensors are activated by every wheel, the two seconds timer is reset also. This means that the bars will go up again two seconds after the last wheel of the train has passed by. Music: Missing You by Blue_Giraffe at SFX: