I used my new IRremote test setup to verify that the library works fine on the Teensy. I haven't tested my library on the other platforms because I don't have the hardware so let me know if you have success or run into problems.
Download
The latest version of the IRremote library with the multi-platform improvements is on GitHub. To download and install the library:- Download the IRremote library zip file from GitHub.
- Unzip the download
- Move/rename the shirriff-Arduino-IRremote-nnnn directory to arduino-000nn/libraries/IRremote.
Thanks again to Paul for adding this major improvement to my library and sending me a Teensy to test it out. You can see from the picture that the Teensy provides functionality similar to the Arduino in a much smaller package that is also breadboard-compatible; I give it a thumbs-up.
It seems that there is now Mega2560 Support, or?
ReplyDeleteI'm a beginner to arduino programming and i'm trying to get it running but i'm getting dozens of errors
ReplyDeleteIn file included from C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:15:
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\/IRremoteInt.h:17:22: error: WProgram.h: No such file or directory
In file included from C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:15:
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\/IRremoteInt.h:146: error: 'uint8_t' does not name a type
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\/IRremoteInt.h:147: error: 'uint8_t' does not name a type
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\/IRremoteInt.h:148: error: 'uint8_t' does not name a type
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\/IRremoteInt.h:151: error: 'uint8_t' does not name a type
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:175: error: 'delayMicroseconds' was not declared in this scope
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:183: error: 'delayMicroseconds' was not declared in this scope
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:202: error: 'OUTPUT' was not declared in this scope
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:202: error: 'pinMode' was not declared in this scope
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:203: error: 'LOW' was not declared in this scope
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:203: error: 'digitalWrite' was not declared in this scope
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp: In constructor 'IRrecv::IRrecv(int)':
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:215: error: 'volatile struct irparams_t' has no member named 'recvpin'
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp:216: error: 'volatile struct irparams_t' has no member named 'blinkflag'
C:\Users\ajnos\Downloads\arduino-1.0-windows\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
....
Edit the file "IRremoteInt.h" and Replace this line
ReplyDelete//#include
#include
Edit the file "IRremoteInt.h" and Replace this line
ReplyDelete//#include WProgram.h
#include Arduino.h
How do I add support for the Mega2560 cant for the life of me work it out I have added
ReplyDelete#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__
where appropriate but cant get this to function. What should I be looking at in the Mega2560 datasheet?
Any advice would be much appreciated.
does it still using pin 3 for sending on mega1280??
ReplyDeleteno its pin 9 on the 2560 I added the #define __AVR_ATmega1280__
ReplyDeleteat the top of
IRremoteInt.h
I tried running the example IRrecord and it shows these errors:
ReplyDeleteC:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:174: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:174: error: 'COM2B1' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:182: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:182: error: 'COM2B1' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:200: error: 'TIMSK2' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'TCCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'WGM22' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'OCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'OCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'TCCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'OCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:229: error: 'TIMSK2' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:229: error: 'OCIE2A' was not declared in this scope
I tried to run the example IRrecord and it shows the following error:
ReplyDeleteC:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:174: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:174: error: 'COM2B1' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:182: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:182: error: 'COM2B1' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:200: error: 'TIMSK2' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'TCCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'WGM22' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'OCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'OCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'TCCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'OCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:229: error: 'TIMSK2' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:229: error: 'OCIE2A' was not declared in this scope
I tried to use the example IRrecord and it shows the error:
ReplyDeleteC:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:174: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:174: error: 'COM2B1' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:182: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:182: error: 'COM2B1' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:200: error: 'TIMSK2' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'TCCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'WGM22' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'OCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'OCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'TCCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'OCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:229: error: 'TIMSK2' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:229: error: 'OCIE2A' was not declared in this scope
I tried to use the example IRrecord and it shows the error:
ReplyDeleteC:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:174: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:174: error: 'COM2B1' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:182: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:182: error: 'COM2B1' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:200: error: 'TIMSK2' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'TCCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'WGM22' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'OCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:210: error: 'OCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'TCCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'TCCR2B' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:226: error: 'OCR2A' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:229: error: 'TIMSK2' was not declared in this scope
C:\arduino-1.0\libraries\IRremote\IRremote.cpp:229: error: 'OCIE2A' was not declared in this scope
I use the last Arduino (1.00) with MEGA 2560. I've made the changes like "arduino.h" and use PIN 9 as IR-LED output pin.
ReplyDeleteI can receive code by using IRrcevDump, and I can also make the IR LED blink by using IRsendDemo.
But somehow the duplicate just don't work.
For example, I press "menu" on remote control and get "Decoded NEC: 8C73E11E (32 bits)" so I modified IRsendDemo as "irsend.sendNEC(0x8c73e11e, 32);".
Everything looks fine just don't work.
Any suggestion about this situation?
Thanks~~
BTW, I got negative value in Raw data:
ReplyDeleteRaw (68): -10094 8900 -4450 600 -1650 600 -500 550 -600 550 -550 600 -1650 550 -1650 550 -600 550 -550 550 -550 550 -1650 600 -1650 600 -1650 550 -550 550 -550 600 -1650 550 -1700 550 -1650 600 -1650 550 -1650 550 -600 550 -550 550 -550 550 -600 550 -1650 550 -600 550 -550 550 -550 550 -1650 600 -1650 600 -1650 550 -1650 600 -550 550
Is it normal?
Has anyone successfully changed pins on mega to 11 yet? I am trying to use IRremote with a touch screen (using UTFT) on my mega2560 but pin 9 is taken. I cant get the demo to work using pin 11, i changed the commented part in the beginning (timer 1, pin 11) but still nothing. irled lights up fine too when outputting on that pin.
ReplyDeleteGreat stuff.
ReplyDeleteHas anyone managed to get a new samsung TV control emulated? AS far as I can find out it appears to be 42 bit? Thanks
I am using Arduino 2560 and I am just trying to run the IRSendDemo but no luck :( there is no output at pin 11?!
ReplyDeleteI try to use 1 arduino to do the sending and receiving, but always cannot receive the IR Codes. I am guessing that the IR data is loss before the software has time to decode it..
ReplyDeletem getting error in IRrecvDemo
ReplyDeleteerror: 'volatile struct irparams_t' has no member named 'rawlen'
NOT WORKING. WASTE OF MY TIME.
ReplyDeleteAnonymous, if there is a problem, please post an issue at https://github.com/z3t0/Arduino-IRremote.
ReplyDeleteSupplying you great companion for your high course dinner or significant cooperates conferences or business meetings they'll also allow you to maintain your nights in lively, lively with all the expertise and ability they maintain.Medication
ReplyDeleteI've had some success with this library creating code to turn on/off TV but the necessary protocol for my Air conditioner is not included Is there a was to easily add protocols for devices by other electronics companies. BtW My Air Con is by Mitsubishi Electronic.
ReplyDelete