IRemote LG remote problem

Hi

I trying to control my LG projector with arduino but I run into difficulties. The remote buttons decode for NEC protocol (but I did some research and the NEC should start with FF) so it's not it:

Decoded NEC: 20DFB54A (32 bits) POWER ON
Raw (68): 22386 8950 -4400 600 -500 600 -500 600 -1600 650 -500 600 -500 600 -500 600 -500 600 -500 600 -1600 650 -1600 600 -500 600 -1600 600 -1650 600 -1600 600 -1600 600 -1650 600 -1600 600 -500 600 -1600 600 -1650 600 -500 600 -1600 600 -500 600 -1600 650 -500 600 -1600 600 -500 600 -500 600 -1650 600 -500 600 -1600 600 -500 600

I follow what others say: To clean the raw data you get from the dump -demo, you need to erase the first number, then convert all negative numbers to positive and place commas between the numbers.

unsigned int projector_onoff[68]={8950,4400,600,500,600,500,600,1600,650,500,600,500,600,500,600,500,600,500,600,1600,650,1600,600,500,600,1600,600,1650,600,1600,600,1600,600,1650,600,1600,600,500,600,1600,600,1650,600,500,600,1600,600,500,600,1600,650,500,600,1600,600,500,600,500,600,1650,600,500,600,1600,600,500,600};
irsend.sendRaw(projector_onoff, 68, 38);

Both my receiver and transmitter and the library works fine. Any idea what to do next? I don't want to give up if I got so far. Remote's type is:
MKJ50025104

Perhaps your research is wrong. Did you try to use the decoded signal before you gave up and switched to RAW mode?

Yes of course:

irsend.sendNEC(0x20DFB54A,32);

Tried it 1-3 times, although this type of remote only send the command once, if you keep holding the button it will send 0s (FFFFFFFF) afterwards.
Anyway I have to learn raw transmission because I want to deal with other remotes later what it cannot even decode.
As the library authors page suggested I checked out the LIRC project:

http://lirc.sourceforge.net/remotes/lg/

My MKJ remote isn't listed but what I noticed that they have shorter codes like:

power 0x10EF
input 0xD02F
tv/radio 0x0FF0

Maybe some part of the 20DFB54A is not necessary?

Hi

I noticed that the code what the IR sends out changing. Maybe somebody knows why and from all this which one is usable. For example this happens for the menu button:

0DF21DE
Decoded NEC: 20DF21DE (32 bits)
Raw (68): 1106 8950 -4400 600 -550 600 -500 600 -1600 550 -550 600 -500 600 -500 600 -550 600 -500 600 -1600 600 -1600 600 -500 600 -1650 600 -1600 600 -1600 600 -1650 600 -1600 600 -500 600 -500 600 -1650 600 -500 600 -500 600 -500 600 -500 600 -1650 600 -1600 600 -1600 600 -500 600 -1650 600 -1600 550 -1600 650 -1650 550 -550 600 
20DF21DE
Decoded NEC: 20DF21DE (32 bits)
Raw (68): 28150 8950 -4400 600 -550 550 -550 600 -1600 550 -550 600 -500 600 -500 600 -550 600 -500 600 -1600 600 -1600 600 -500 600 -1650 550 -1650 600 -1600 600 -1650 550 -1650 600 -500 600 -500 600 -1650 600 -500 600 -500 600 -500 600 -500 600 -1650 550 -1650 600 -1600 600 -500 600 -1650 550 -1650 600 -1600 600 -1650 600 -500 600 
20DF21DE
Decoded NEC: 20DF21DE (32 bits)
Raw (68): 7256 8950 -4400 600 -500 600 -550 600 -1600 600 -500 600 -500 600 -500 600 -500 600 -550 600 -1600 600 -1600 600 -500 600 -1650 600 -1600 600 -1600 600 -1650 600 -1600 600 -500 600 -500 600 -1650 600 -500 600 -500 600 -500 600 -500 600 -1600 600 -1650 600 -1600 600 -500 600 -1600 600 -1650 600 -1600 600 -1600 600 -550 600 
20DF21DE
Decoded NEC: 20DF21DE (32 bits)
Raw (68): -30542 8900 -4450 550 -550 600 -500 600 -1600 600 -500 600 -500 600 -550 600 -500 600 -500 600 -1600 600 -1650 600 -500 600 -1600 600 -1600 600 -1650 600 -1600 600 -1600 600 -500 600 -550 600 -1600 600 -500 600 -500 600 -500 600 -500 600 -1650 600 -1600 600 -1600 600 -550 600 -1600 600 -1600 600 -1650 550 -1650 600 -500 600 
20DF21DE
Decoded NEC: 20DF21DE (32 bits)
Raw (68): 31166 8950 -4400 600 -550 550 -550 600 -1600 600 -500 600 -500 600 -500 600 -500 650 -500 600 -1600 600 -1600 600 -500 600 -1650 600 -1600 600 -1600 600 -1650 600 -1600 550 -550 600 -500 600 -1650 600 -500 600 -500 600 -500 600 -500 600 -1650 550 -1650 600 -1600 600 -500 600 -1650 600 -1600 600 -1600 600 -1650 550 -550 600 
20DF21DE
Decoded NEC: 20DF21DE (32 bits)
Raw (68): -15156 8950 -4400 600 -500 600 -500 600 -1650 600 -500 600 -500 600 -500 600 -500 600 -500 600 -1650 600 -1600 600 -500 600 -1600 600 -1650 600 -1600 600 -1600 600 -1650 600 -500 600 -500 600 -1600 600 -500 600 -550 600 -500 600 -500 600 -1600 600 -1600 600 -1650 600 -500 600 -1600 600 -1650 600 -1600 600 -1600 600 -500 600 
20DF21DE
Decoded NEC: 20DF21DE (32 bits)
Raw (68): -11744 8950 -4400 600 -500 600 -500 600 -1650 600 -500 600 -500 600 -500 600 -500 600 -500 600 -1650 600 -1600 600 -500 600 -1600 600 -1650 600 -1600 600 -1600 600 -1650 600 -500 600 -500 600 -1600 600 -550 600 -500 600 -500 600 -500 600 -1600 600 -1650 600 -1600 600 -500 600 -1600 600 -1650 600 -1600 600 -1600 600 -500 600

Each and every time my projector switches the menu on/off but here I keep getting different codes, like the receiver couldn't get it well.

There is just a bug in the IRremote output as follows:
Raw (68): 28150 8950 -4400 600

The red number above should have '-' before it.

Another thing to remember is that when you are sending with RAW mode using IRremote, always start with the '+' number in your buffer first. So in the above example your buffer should start with 8950.

Timings:
The NEC protocol has the following timings... 9000, 4500, 560, 1690. IRremote just records to the nearest 50 uSecs, which is why the values change a bit (also because of the physical characteristics of the signal and the receiver).
SO if you are using RAW mode change all the values to the nearest of the accurate ones above. You will then get a much better signal in terms of accuracy & range.