Arduino IR Remote library not working

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Re: Arduino IR Remote library not working

Postby ahdavidson » Thu Mar 08, 2012 2:47 pm

Yes. I understand.

1. The routine does not wait forever with a zero value for the parameter; I still get -1 returns. There is some discussion about this earlier in this thread, but I don't think the library has been updated.

2. In any case, I can't afford to wait for even 1 second. I have other timings in the loop that need to be checked at least every 50 milliseconds, if not less.
.andy
User avatar
ahdavidson
 
Posts: 130
Joined: Wed Jun 03, 2009 8:59 am
Location: Seattle, WA

Re: Arduino IR Remote library not working

Postby adafruit » Thu Mar 08, 2012 4:20 pm

there is no other option in the library - there is no interrupt-based IR reading code in there and we have no plans to write an interrupt-based system nor do we have a tutorial on how to write that kind of code, or know of any code that can do what you're looking for
User avatar
adafruit
 
Posts: 10483
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Arduino IR Remote library not working

Postby philba » Fri Mar 09, 2012 11:57 am

I don't think an interrupt driven reader is all that hard if you are using a receiver like one of the Vishay TSOP devices. Basically, it's just taking an interrupt, reading the time, determining if it's a mark or space (based on rising or falling edge) and saving it away. The main loop can know to retrieve the sequence if the current "space" is longer than some predetermined period.
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 5:59 pm

Re: Arduino IR Remote library not working

Postby madworm_de » Sun Apr 01, 2012 3:15 pm

Have a look at this. It works quite nicely and is pin-change interrupt based. No protocol decoding, just comparing raw data.
NO LARDO CHIPS
User avatar
madworm_de
 
Posts: 99
Joined: Mon Jun 09, 2008 5:56 am

Re: Arduino IR Remote library not working

Postby SeriousSam » Mon Jun 04, 2012 3:33 pm

I think I found the problem for the adafruit mini remote control. It does not properly follow the NEC protocol.
It sends "0 191" instead of "0 255" for address and checksum followed by correctly coded command and checksum.
I attached my C source that runs on an arduino.
Attachments
main.c
(2.89 KiB) Downloaded 81 times
SeriousSam
 
Posts: 1
Joined: Tue Feb 07, 2012 6:50 pm

Previous

Return to General Project help

Who is online

Users browsing this forum: Google [Bot] and 10 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [105]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]