Lego IR testing
Thought it would be cool to have an Arduino controled lego train. Something that would take input and stop/start the train, etc.
To start, found some code fragments like:
Lego powerfunctions IR
Using the examples I could find, wrote a simple sketch that basically sent a start signal, waited a few seconds, and sent a stop signal. For the IR led, used Radio Shack 276-0142 simply connected with a resistor to one of the Arduino pins. Range with the RS LED was upto 15". Later switched out the LED for a Everlight 5mm IR333-A, range improved upto 27".
Loaded the sketch to a LittleBits Arduino Module and got it to work. Just needed to change the pin, and switch the output to PWM (it's a physical switch). Range with the LittleBits IR LED was upto 20"
After serveral experiments, seems the most reliable way to pass commands to the train was through an IR led right over the train. In this video, there is a loop in the arduino codesending the stop command so the train will be sure to get it.