[Solved] IR-Library, how to send other codes than RC5/6 etc ?

Hi to every one. This is a quiestion about the Irlibary found here: GitHub - Arduino-IRremote/Arduino-IRremote: Infrared remote library for Arduino: send and receive infrared signals with multiple protocols.

I have a project that is a programable universal remote control, it basicaly recieves a code, stores it, and send it later. It's working OK but not with all the TV's I've tried.

I've been used this library for a while but now I noticed that they have added more protocols, in the Example: "IRrecvDumpV2" it says:

void  encoding (decode_results *results)
{
  switch (results->decode_type) {
    default:
    case UNKNOWN:      Serial.print("UNKNOWN");       break ;
    case NEC:          Serial.print("NEC");           break ;
    case SONY:         Serial.print("SONY");          break ;
    case RC5:          Serial.print("RC5");           break ;
    case RC6:          Serial.print("RC6");           break ;
    case DISH:         Serial.print("DISH");          break ;
    case SHARP:        Serial.print("SHARP");         break ;
    case JVC:          Serial.print("JVC");           break ;
    case SANYO:        Serial.print("SANYO");         break ;
    case MITSUBISHI:   Serial.print("MITSUBISHI");    break ;
    case SAMSUNG:      Serial.print("SAMSUNG");       break ;
    case LG:           Serial.print("LG");            break ;
    case WHYNTER:      Serial.print("WHYNTER");       break ;
    case AIWA_RC_T501: Serial.print("AIWA_RC_T501");  break ;
    case PANASONIC:    Serial.print("PANASONIC");     break ;
    case DENON:        Serial.print("Denon");         break ;
  }
}

But I can't find the way to Send those codes... In the examples I only see:

irsend.sendRC6(codeValue, codeLen);
irsend.sendRC5(codeValue, codeLen);
irsend.sendSony(codeValue, codeLen);
irsend.sendNEC(codeValue, codeLen);
or irsend.sendRaw(rawCodes, codeLen, 38); if codetype==UNKNOWN

How could I do this? Is there a method to send the new codetypes??

Thank you very much

There are configuration defines in IRremote.h that enable/disable single protocol sends/receives.

A look at the keywords.txt file reveals

sendNEC	
sendSony
sendSanyo
sendMitsubishi
sendRaw	
sendRC5	
sendRC6	
sendDISH 
sendSharp
sendSharpRaw 
sendPanasonic 
sendJVC

Hi Whandall, thanks for your answer. I've checked what you said and I see that all the protocols are enabled in the IrRemote.h, but when I write the keywords like sendPanasonic in my sketch they doesn't appear colored like "sendNEC" and I have imported the library. Am I missing something?

Thanks!

Whandall:
There are configuration defines in IRremote.h that enable/disable single protocol sends/receives.

A look at the keywords.txt file reveals

sendNEC 

sendSony
sendSanyo
sendMitsubishi
sendRaw
sendRC5
sendRC6
sendDISH
sendSharp
sendSharpRaw
sendPanasonic
sendJVC

As long as the code compiles, the color does not really matter, does it?

Sometimes the coloring seems to fail, I've seen that myself before.

You 're right! the code compiles with no errors. Now I need to play a little with the code :smiley:

Thnks for your help!

Whandall:
As long as the code compiles, the color does not really matter, does it?

Sometimes the coloring seems to fail, I've seen that myself before.

In the keywords.txt file the names and the KEYWORDx stuff
have to be seperated by a tab to work,
the IR-Library uses - at least for one entry - a space.

You can change that, but remeber to restart the ide to see the effect.

keywords.txt: no tabs = no highlight

Whandall:
In the keywords.txt file the names and the KEYWORDx stuff
have to be seperated by a tab to work,
the IR-Library uses - at least for one entry - a space.

You can change that, but remeber to restart the ide to see the effect.

keywords.txt: no tabs = no highlight

Excellent, I made the corrections using TAB and all looks beautiful now, Thanks!