Help using the RMT Infrared transceiver

pabl40
Posts: 15
Joined: Thu May 02, 2024 11:12 am

Help using the RMT Infrared transceiver

Postby pabl40 » Fri May 31, 2024 12:36 pm

I have an application already working which runs on an Arduino Node MCU board which sends IR commands to an IR transmitter. There is good library support ( IRremoteESP8266 ) for to achieve this on the Arduino.

https://github.com/crankyoldgit/IRremot ... creens.cpp

Basically there are just three IR Hex commands which I must be able to send :
0xFEA3387 (STOP)
0xFDA2256 (UP)
0xFBA1136 (DOWN)

Example:

Code: Select all

 irsend.sendElitescreens(0xFEA3387);
Now I wish to develop a similar application for an ESP32-C6-DevKitM-1 development board.

I am trying to understand and adapt the IR_NEC_TRANSCEIVER example which is part of the ESP-IDF repository :
https://github.com/espressif/esp-idf/tr ... ransceiver

There is a function called as follows in the example, with just random address and command values:

Code: Select all

const ir_nec_scan_code_t scan_code = {
        .address = 0x0440,
        .command = 0x3003,
};

rmt_transmit(tx_channel, nec_encoder, &scan_code, sizeof(scan_code), &transmit_config);
I am struggling to figure out how to simply send a hex command like from the Arduino application such as 0xFDA2256.

I tried the following:

Code: Select all

uint64_t payload = 0xFDA2256;

rmt_transmit(tx_channel, nec_encoder, &payload, sizeof(payload), &transmit_config);
There is an IRrecvDump application which runs on an Arduino which reads Infrared messages and dumps all the information. https://github.com/crankyoldgit/IRremot ... cvDump.ino

I don't understand how I end up with the data, code and address as below. My aim here is to have the data and code as 0xFDA2256 . I would appreciate any help or clarity with this. Thanks.

Code: Select all

Timestamp : 000104.243
Library   : v2.8.6

Protocol  : NEC_LIKE
Code      : 0x6A445BF0 (32 Bits)
uint16_t rawData[67] = {8992, 4508,  544, 562,  566, 1716,  522, 1716,  546, 560,  544, 1716,  546, 558,  542, 1720,  544, 560,  542, 588,  546, 1714,  540, 566,  544, 562,  568, 560,  544, 1716,  546, 558,  544, 586,  546, 558,  542, 1744,  522, 558,  542, 1744,  520, 1714,  542, 566,  544, 1714,  548, 1716,  520, 1714,  546, 1716,  522, 1714,  548, 1714,  544, 558,  572, 558,  580, 526,  544, 584,  520};  // NEC_LIKE 6A445BF0
uint32_t address = 0x2256;
uint32_t command = 0x0;
uint64_t data = 0x6A445BF0;

MicroController
Posts: 1605
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Help using the RMT Infrared transceiver

Postby MicroController » Fri May 31, 2024 2:32 pm

It may be easier to find/write an encoder for your IR protocol than trying to get the NEC encoder to output a protocol that's not NEC.

pabl40
Posts: 15
Joined: Thu May 02, 2024 11:12 am

Re: Help using the RMT Infrared transceiver

Postby pabl40 » Mon Jun 03, 2024 1:58 pm

MicroController wrote:
Fri May 31, 2024 2:32 pm
It may be easier to find/write an encoder for your IR protocol than trying to get the NEC encoder to output a protocol that's not NEC.
I think so. Any idea where I can find one? This is what I need, https://github.com/crankyoldgit/IRremo ... ree/master . However it is just for the Arduino.

techsavycoder
Posts: 2
Joined: Sun Jul 07, 2024 5:24 am

Re: Help using the RMT Infrared transceiver

Postby techsavycoder » Fri Jul 12, 2024 10:38 pm

Did you get any update?

Who is online

Users browsing this forum: Baidu [Spider] and 73 guests