EDIT: This isn't a duplicate of my previous post, it is related to the same project however.
On my previous question I asked what could be the cause. I've found out what it is - frequency. My previous IR detector was an IR module and not an IR sensor. The difference could be seen here

What difference does the sensor make? That is just a hardware issue. The incoming pulses will still be the same.
– Nick Gammon♦Oct 2 '15 at 16:13

3

@NickGammon The difference is how the pulses are presented - a receiver amplifies and filters the signal, so you get a sequence of simple on-off pulses. With a detector you get whatever IR light is coming in. It's then up to you to filter out the light that is pulsing on and off at the carrier frequency to determine when the on is and when the off is. That could be done in software, or it could be done in hardware. Best to do it in hardware and use a matched receiver for your transmitter.
– Majenko♦Oct 2 '15 at 16:48

@Majenko exactly. I didn't elaborate on the problem I want to solve: I have an IR module which decodes my remote as NEC. Retransmitting it with the same library doesn't work. Debugging a bit more shows that the remote sends pulse modulation at 830Hz. Could a 38kHz module decode this?
– omribahumiOct 2 '15 at 16:58

That's a whole different question. Better post a new question instead of adding this in the comments.
– GerbenOct 2 '15 at 17:32

IRremote (already recommended) - but to save you some time, use the IRRecvDump example to grab the raw codes you need for sendRaw(). They need to be averaged out across 10-20 reads. I log the output to a file, and use a perl script to do it for me, since it is painful to type this into a calculator a million times. The resistor you connect to the sensor affects its sensitivity - I used 330ohm, and have ~10 metres range from a 3V3 remote inside, 4-5 metres outside in sunlight. I would give you the script, but it's on my desktop. Let me know if you need it - or just use python, which is so popular nowadays (indent-or-fail... feh. what about people who don't like setting up the tab-space continuum, and don't have fancy editors...mumblemumble)
Edit: my raw codes absolutely needed to be averaged out, or they were useless. Any negative values in the array can just be made positive, don't fret.