5

I'm looking for a library to decode RAW IR signals from an IR sensor (looks like a black LED, two legged) rather than an IR module (3 legged, rated for a particular frequency - such as 38kHz).

Is there a library that supports IR sensors?

A picture of the two possibilities can be seen here

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

omribahumi
  • 189
  • 4

3 Answers3

1

I had a similar project a few months back and spotted this Arduino Library:

https://github.com/z3t0/Arduino-IRremote

and it is invaluable.

For your instance, you want the RAW Data which you can achieve using an Example included in the Library named: IRrecvDemo.

The wiring is easy and straight forward

An IR detector/demodulator must be connected to the input RECV_PIN.

Which is 11 by default but you can definitely change it :3

and the other two Legs of the IR detector/demodulator go to the power source.

Mero55
  • 201
  • 1
  • 6
1

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.

user400344
  • 348
  • 1
  • 11
0

I'm looking for a library to decode RAW IR signals from an IR sensor

AGirs includes a comprehensive library designed to work with raw IR signals. I've used GirsLite in an Arduino and IrScrutinzer in Windows to do advance IR protocol snooping.

BartmanEH
  • 230
  • 1
  • 11