Automated remote control of a LEGO model railway, based on Raspberry Pi Zero W.
Documentation of the protocol used by the LEGO Power Functions infrared remote control can be found here.
Following the awesome advice in Brian Schwind's blog, I disregarded lirc and went for the pigpio library, which worked like a charm. Install it and configure pigpiod
to run on boot:
pi@raspberrypi:~ $ sudo apt install python3-pigpio
pi@raspberrypi:~ $ sudo systemctl enable pigpiod
pi@raspberrypi:~ $ sudo systemctl start pigpiod
Hardware used:
- Raspberry Pi Zero W
- Micro SD card 2 GB (running Raspbian Stretch Lite image)
- Micro USB charger (could try a small USB powerbank instead)
- Infrared transmitter module (any 5mm IR LED should work)
- some wiggly wires