This introduction tutorial explains the basic steps to control a Lego Power Functions train with an arduino! From wiring up an infrared LED to writing the code, this tutorial has everything you need to know to automate your Power Functions train!
Power Functions library: https://tinyurl.com/2p8wjt8r *NEW LINK 12/12/2021*
LED Resistor calculator: http://led.linear1.org/led.wiz