Google-apper
Hovedmeny

Post a Comment On: Ken Shirriff's blog

"IRremote library now runs on the Teensy, Arduino Mega, and Sanguino"

22 Comments -

1 – 22 of 22
Anonymous Phil said...

It seems that there is now Mega2560 Support, or?

August 14, 2011 at 11:48 PM

Blogger ragtek said...

I'm a beginner to arduino programming and i'm trying to get it running but i'm getting dozens of errors

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: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()':
....

December 2, 2011 at 12:31 PM

Anonymous Anonymous said...

Edit the file "IRremoteInt.h" and Replace this line

//#include
#include

December 4, 2011 at 4:05 AM

Anonymous Anonymous said...

Edit the file "IRremoteInt.h" and Replace this line

//#include WProgram.h
#include Arduino.h

December 4, 2011 at 4:07 AM

Blogger Gazos said...

How do I add support for the Mega2560 cant for the life of me work it out I have added

#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.

January 7, 2012 at 10:23 AM

Anonymous Anonymous said...

does it still using pin 3 for sending on mega1280??

February 16, 2012 at 9:08 AM

Anonymous Anonymous said...

no its pin 9 on the 2560 I added the #define __AVR_ATmega1280__
at the top of
IRremoteInt.h

March 7, 2012 at 8:25 AM

Blogger Bhawna said...

I tried running the example IRrecord and it shows these errors:




C:\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

March 12, 2012 at 11:26 AM

Blogger Bhawna said...

I tried to run the example IRrecord and it shows the following error:




C:\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

March 12, 2012 at 11:27 AM

Anonymous Anonymous said...

I tried to use the example IRrecord and it shows the error:



C:\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

March 12, 2012 at 11:28 AM

Anonymous Anonymous said...

I tried to use the example IRrecord and it shows the error:



C:\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

March 12, 2012 at 11:28 AM

Blogger jasonh77tw said...

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.
I 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~~

April 3, 2012 at 11:38 AM

Blogger jasonh77tw said...

BTW, I got negative value in Raw data:
Raw (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?

April 3, 2012 at 11:55 AM

Anonymous thisguyrighthere said...

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.

November 27, 2012 at 6:40 PM

Anonymous Anonymous said...

Great stuff.
Has anyone managed to get a new samsung TV control emulated? AS far as I can find out it appears to be 42 bit? Thanks

December 5, 2012 at 4:54 AM

Anonymous Eman said...

I am using Arduino 2560 and I am just trying to run the IRSendDemo but no luck :( there is no output at pin 11?!

February 5, 2013 at 5:32 AM

Anonymous Anonymous said...

I 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..

March 19, 2013 at 12:43 AM

Anonymous Anonymous said...

m getting error in IRrecvDemo

error: 'volatile struct irparams_t' has no member named 'rawlen'

July 8, 2013 at 8:54 AM

Anonymous Anonymous said...

NOT WORKING. WASTE OF MY TIME.

July 27, 2016 at 6:43 PM

Blogger Ken Shirriff said...

Anonymous, if there is a problem, please post an issue at https://github.com/z3t0/Arduino-IRremote.

July 27, 2016 at 8:22 PM

Blogger Robert Jennifer said...

Supplying 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

December 4, 2018 at 7:49 PM

Blogger Kiera White said...

I'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.

April 3, 2019 at 3:36 AM

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot