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_wait_tx_done(RMT_CHANNEL, portMAX_DELAY); rmt_set_pin(RMT_CHANNEL, RMT_MODE_TX, EXT_LED_IO_NUM); rmt_write_items(RMT_CHANNEL, item, item_num, true); rmt_wait_tx_done(RMT_CHANNEL, portMAX_DELAY); free(item);
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.