I'll throw this one out there as well. It is dead simple as far as the actual circuit; Vcc(5-12VDC), Ground, a pair of 220 Ohm resistors connected from ground to the LEDs, and a pair of wires from the high side of the LEDs to an Arduino-type micro-controller. Total cost is under $2.50 in parts. Depending on what sort of electronics is in the engine, it may also be pretty simple to add rule17 lighting and cab light that goes off when the engine is moving for just a few cents more.
This is just a quick and dirty version of the code, that alternates the LEDs, fading them on and off. well not quite off, I set it to go dim but not quite turn all the way off.
Also I only had blue LEDs on hand, but white ones usually take the same voltage and current to work.
int Led1 = 5; // Set LED 1 Pin
int Led2 = 6; // Set LED 1 Pin
int brightnessOne = 5; // Set LED1 start brightness
int brightnessTwo = 250; // Set LED2 start brightness
int fadeAmount = 5; // how much to fade the LED by each cycle
int onTime = 250; // Time to hold at each end of fade (milliseconds)
void setup() {
// put your setup code here, to run once:
pinMode(Led1, OUTPUT); //Set LED1 pin as Output
pinMode(Led2, OUTPUT); //Set LED2 pin as Output
}
void loop() {
// put your main code here, to run repeatedly:
// set the brightness of each LED:
analogWrite(Led1, brightnessOne);
analogWrite(Led2, brightnessTwo);
// change the brightness for next time through the loop:
brightnessOne = brightnessOne + fadeAmount; // LED1 advance
brightnessTwo = 256 - brightnessOne; // LED2 advance
// reverse the direction of the fading at the ends of the fade:
if (brightnessOne <= 5 || brightnessOne >= 250) {
fadeAmount = -fadeAmount ;
delay(onTime); // Delay for each end of fade
}
delay(5); // Delay between fade steps
}
JGL