Software to control and detect toy train track conditions using an Arduino Mega 2560