1

I've been trying to create a voice activated IR Remote, using LIRC and a Respeaker 4 Mic Hat. Both are working perfectly individually. However, when I uncomment the line

#dtoverlay=lirc-rpi,gpio_out_pin=17

in /boot/config.txt, the Respeaker doesn't appear in

arecord -l

So my question is, is it possible to use other GPIO pins, while using LIRC? I assume LIRC blocks all the GPIO pins or something, which prevents the Respeaker from functioning. In particular is it possible that other pins can be used while LIRC is running? For example, if the IR LED is configured to pin 17, is it possible to use another pin at the same time? The Respeaker uses around 15 pins I think. Is it possible to use those pins whilst LIRC is running?

1

Yes, it is possible to configure LIRC to use other GPIO pins. In /boot/overlays/README there is an example just about this:

Overlays are loaded using the "dtoverlay" directive. As an example, consider the popular lirc-rpi module, the Linux Infrared Remote Control driver. In the pre-DT world this would be loaded from /etc/modules, with an explicit "modprobe lirc-rpi" command, or programmatically by lircd. With DT enabled, this becomes a line in config.txt:

dtoverlay=lirc-rpi

This causes the file /boot/overlays/lirc-rpi.dtbo to be loaded. By default it will use GPIOs 17 (out) and 18 (in), but this can be modified using DT parameters:

dtoverlay=lirc-rpi,gpio_out_pin=17,gpio_in_pin=13

For details on setting the parameter of lirc-rpi look in the same README at the section:

Name:   lirc-rpi
| improve this answer | |
  • I do understand that LIRC can be configured to other pins. However, my question was if other pins can be used while LIRC is running. For example, is the IR LED is configured to pin 17, is it possible to use another pin at the same time? The Respeaker uses around 15 pins I think. Is it possible to use those pins whilst LIRC is running? – JonSnow Oct 5 '18 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.