Install lirc :
pi@moode:~ $ sudo apt update
pi@moode:~ $ sudo apt install lirc
Find setting for NAD:
pi@moode:~ $ irdb-get find nadnad/451.lircd.conf
nad/AVR2.lircd.conf
nad/AVR2.lircd.conf
nad/CDP-5425.lircd.conf
nad/RC512.lircd.conf
nad/SR6.lircd.conf
nad/SR712.lircd.conf
Ok, i choose SR6 (NAD_SR712 seems working also):
pi@moode:~ $ irdb-get download nad/SR6.lircd.conf
Downloaded https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/nad/SR6.lircd.conf as SR6.lircd.conf
and copy to etc folder:
pi@moode:~ $ sudo cp SR6.lircd.conf /etc/lirc/lircd.conf.d/
( or downloard lirc remote setting for NAD (325 use SR5 but SR6 seems working..) :
wget http://lirc.sourceforge.net/remotes/nad/SR6
)
Setup GPIO
GPIO 22 is used to transmit remote code by a simple NPN transistor and an IR LED:
Edit /boot/config.txt and add GPIO output line at the end :
pi@moode:~ $ sudo nano /boot/config.txt
driver = default
pi@moode:~ $ sudo cp /etc/lirc/lircd.conf.dist /etc/lirc/lircd.conf
Reboot
pi@moode:~ $ sudo reboot
Test by sending code to NAD
Send 100 times the code KEY_POWER:
Turn on the amplifier after booting with a service !
pi@moode:~ $ sudo nano /etc/systemd/system/amplifierOn.serviceMake this file executable:
pi@moode:~ $ sudo chmod 666 /etc/systemd/system/amplifierOn.service
Enable the service:
pi@moode:~ $ sudo systemctl enable /etc/systemd/system/amplifierOn.serviceJan 26 08:47:39 moode systemd[1]: Started Set up amplifier.
Which indicates that everything is working normally... if not... good luck ! |