I have several problems:
First of all its working only with one of the 3 remotes I tried(the oldest one) and the results wasn't constant. Secondly one time I got 10 and after that 2 (on the same button).
I don't have oscilloscope but I think its connected to the size of the data package I get from the remote (8bit,32 bit etc.) I think that because after I press a button from the oldest remote and then on one of the newest remotes I get a value.
I know I've seen a posting in the "Exhibition" or "interfacing" section of the forum from someone who did a similar application. It might be the same one, though.
when I press 2 for example its show me 802 or 2 randomly(3 or 803 , 4 or 804 etc.).
Could it be that the remote sends one code when you press a button, and that code + 800 when you release it?
when I press 2 for example its show me 802 or 2 randomly
Annoying... and my solution takes away the pleasure of having done something "properly"... but if one or the other is a rare interpretation, couldn't you just ignore the mis-read (or is it mis-send?) events? You might, in software, want to implement an "only act if you see the signal twice" guard- against- false- reads anyway.
Some problems are more trouble to solve than they are worth, if there's a way around them.
As for the remote that doesn't work: Forgive a "silly" question, but it IS sending something, isn't it? Does it work with anything, e.g. whatever appliance it came with? (Look at it with a cheap webcam... they can often "see" IR. (Try one of your "known working" remotes with the webcam you have to hand)
There are other modulation schemes... and I'm not talking the encoding. Even mildly "fancy" IR detectors meant for remote controls only "see" IR light if it is "buzzing" at a particular frequency. (This to make them "blind" to miscellaneous sources of IR). Your sender maybe "tuned" to a different "buzz".
I'm familiar with the 2, 802 thing. It alternates every time between two numbers so that the TV knows that you are pressing the button again and not just holding down the button. If you want to do something every time you press 2 then say if (input == 2 || input == 802){
If it doesn't automatically decode the remote and you want to deal with the raw data coming in you can also use that library. There is an example on doing that on 'step 3' of this page: