RMT output the same signal on multiple pins
Posted: Tue Sep 15, 2020 12:13 pm
Hi,
I am using RMT peripheral to generate an IR signal for various types of remote control protocols.
Currently, i am only using a single IR LED and i want to add an external IR transmitter on another pin for a wider signal coverage.
I want both of LEDs to produce the same signal simultaneosly, so the device will only receive the signal once. My code looks like this.
The output is two identical signal where the second one is sent right after the first one is finished, which i think makes sense.
However this will make the device receive the same signal twice.
What is the best way to solve this issue? Or is there some other way to produce the signal on both pins at once?
Any help would be appreciated.
Thanks!
I am using RMT peripheral to generate an IR signal for various types of remote control protocols.
Currently, i am only using a single IR LED and i want to add an external IR transmitter on another pin for a wider signal coverage.
I want both of LEDs to produce the same signal simultaneosly, so the device will only receive the signal once. My code looks like this.
Code: Select all
int item_num = 0;
size_t size = sizeof(rmt_item32_t) * 300;
rmt_item32_t *item = (rmt_item32_t *)malloc(size);
memset((void *)item, 0, size);
item_num = rmt_build_items(item);
rmt_write_items(RMT_CHANNEL, item, item_num, true);
rmt_set_pin(RMT_CHANNEL, RMT_MODE_TX, EXT_LED_IO_NUM);
rmt_write_items(RMT_CHANNEL, item, item_num, true);
free(item);
However this will make the device receive the same signal twice.
What is the best way to solve this issue? Or is there some other way to produce the signal on both pins at once?
Any help would be appreciated.
Thanks!