IR send/receive (https://www.digikey.de/en/maker/tutorials/2021/how-to-send-and-receive-ir-signals-with-a-raspberry-pi)
- cd /boot
- sudo vi config.txt (uncomment and id gpio pins used for receive and transmit) - reboot to enable
- sudo apt install ir-keytable
- sudo ir-keytable -c -p all -t (will display IR received by protocol -> events)
- sudo apt install lirc
- cd /etc/lirc
- sudo vi lirc_options (may have to update device /dev/lirc0) - reboot
- sudo systemctl stop lircd.service (??)
- sudo mode2 -d /dev/lirc0 (will display 'raw' IR data received)
- config.txt - dtoverlay - verify appropriate GPIO pins
- sudo ir-keytable -c -p all -s rc1 -t (-p all) & (-s rc1)
- IR Sender: ir-ctl -S rc5:0x10 -d /dev/lirc0
lsmod | grep gpio - to verify that gpio pins are assigned (pinout will also verify IN | OUT)
Setting up a switch to control IR output
- send IR signals as before
- establish GPIO output (raspi-gpio set ## [BCM] op)
- turn switch on/off -> raspy-gpio set ## (dh for 1, dl for 0)
Posted by: admin
2025-02-14 17:10:49