IRMP-org / IRMP

Infrared Multi Protocol Decoder
GNU General Public License v3.0
267 stars 43 forks source link

[Question] Use 2 or more IR leds to send #28

Closed onolox closed 3 years ago

onolox commented 3 years ago

IDE

IR-Protocol

Example to reproduce the issue

Version

Expected behavior

Hi, I want to use 2 IR leds to send to 2 different devices that are at different locations, I don't understant the example of IRMP_IRSND_ALLOW_DYNAMIC_PINS.

How I can put the 2 leds in 2 pins of arduino?

ArminJo commented 3 years ago

Use the current clone pattern known as series connection. Do not forget to reduce the series resistor to get the same current as with 1 LED. And then use just one pin, it will work!

onolox commented 3 years ago

I know that I can use this approach, but i want a more elegant solution.

ArminJo commented 3 years ago

Call irsnd_init(tIRSNDOutputPin) each time you switch the output pin eg. before sending. I have not tested it, but it should work.