An Arduino based train controller