loading

This Instructable will tell you how to use the IR (infrared) library on an Attiny. I will be using an Attiny85 with an Arduino Uno. I won't cover how to upload sketches to the Attiny just how to use the IR library with it. the best tutorial on uploading sketches I've found is this YouTube tutorial :

(a quck note and warning, You will need to have software serial working for the attiny (follow this instructable : https://www.instructables.com/id/Attiny-serial-monitor-using-arduino-walkthrough/) or google it

Step 1: Getting the Files

Hey Guys this instructables is a bit old and I would recommend using the arduino 1.0.5 Ide and it should work just fine as the newer updated Ides have been changed so this no longer works. Just download the 1.0.5 ide as a zip file from the arduino site and extract it to a different directory to your current ide so they don't interfere with each other.

The main issues that you would come across when trying to use the IR library with an Attiny are errors like this:

C:\Program Files (x86)\Arduino\libraries\IRremote\IRremote.cpp:229: error: 'TCCR2B' was not declared in this scope

this is all to do with different timers on the Attiny than the Atmega chip but we don't need to worry about it unless you want to change the library code (THAT IS SOME HARD STUFF DON'T CHANGE THE CODE) but there are some libraries or the same library just ported to the Attiny so the codes we write is the same as it is for the arduino. you can download the zip file here :

http://gammon.com.au/Arduino/IRremote_Attiny.zip

Just extract the files and put the IRremote file in the libraries folder in the the arduino folder the path should look like

C:\Users\(your user)\Documents\Arduino\libraries

you will also need to download this for the next step:

http://forum.arduino.cc/index.php?PHPSESSID=f55lj4...

Step 2: Fixing the Final Error

Hopefully if you try to upload a sketch utalising the IR library you should now be left with this error

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o:(.init9+0x2): relocation truncated to fit: R_AVR_13_PCREL against symbol `exit' defined in .fini9 section in c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr25\libgcc.a(_exit.o)

But don't worry if you don't you may likely be using the wrong core so just skip to step 4 (Troubleshooting) and come back to this step.

if you have the error above you are going to need to extract the second download from the last step (tinyPCRELpatch.zip) this step is quite easy just copy the hardware folder to the hardware folder in where you installed the arduino ide (IT IS NOT WHERE WE PUT THE IR LIBRARY FOLDER) it will be some where in your program files (x86) (or the version for your operating system and pc). The path for mine is:

C:\Program Files (x86)\Arduino\hardware

once you copy it it will ask you if you want to replace Id.exe (make sure its only Id.exe and nothing else) select replace and let it copy (it doesn't affect the normal ide so once its there you don't need to worry.

if you are using a mac read reply #4 on this thread:

http://forum.arduino.cc/index.php?PHPSESSID=8t8a2l...

Step 3: A Bit of Code

This step is about code that I used to first get this working it was code that i used on the arduino except different pin numbers due to the less amount of pins on the attiny85. however for this code you will need to use an arduino and the serial monitor just so you can find out the code the buttons use. all the code and can be found here : https://www.instructables.com/id/The-Easiest-Way-to...

Step 4: Troubleshooting

If in step 2 you did not get the different error you probably are using the wrong. the core used for software serial should work but if it doesn't then you can download this one:

https://arduino-tiny.googlecode.com/files/arduino-...

follow the installation guide in the read me file if your computer says that it can't open it just browse for a program and open it in note pad it should open just fine anyway.

If you want to switch back to using the IR library for the Arduino and not the Attiny the you will need to replace the ported library with the regular library which you can download from here:

http://www.mediafire.com/download/jd5j7911amju36g/...

i hope this helps this is my first instructable if there are any problems feel free to message me as i know it van be hard to find a straight tutorial for this on the internet. All the infomation in this tutorial came from these sites:

http://forum.arduino.cc/index.php?topic=180611.0

http://forum.arduino.cc/index.php?PHPSESSID=8t8a2l...

https://www.instructables.com/id/Attiny-serial-moni...

https://www.instructables.com/id/The-Easiest-Way-to...

<p>thank u very much</p>
<p>I have modified the library and it now works perfectly (tested on an ATtiny85). Follow the same instructions as for IRremote_Attiny.zip</p><p>You'll need to change the #include names but everything else is identical.</p><p><a href="https://drive.google.com/open?id=0B_w9z88wnDtFNHlqYU5sWEZuV0U" rel="nofollow">https://drive.google.com/open?id=0B_w9z88wnDtFNHlqYU5sWEZuV0U</a></p>
<p>Awesome, you made my day man. I've looked everywhere (literally) and this is the only working code that I have found.</p><p>In case anyone have issues, I have used the tiny core from:</p><p><a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/arduino-tiny/arduino-tiny-0150-0020.zip" rel="nofollow">https://storage.googleapis.com/google-code-archive...<br></a></p><p>You need to change the timer for millis in the attiny core:</p><p>edit the file tiny/avr/cores/tiny/core_build_options.h<br>look out for tiny85 section and leave the timer define like:<br>#define TIMER_TO_USE_FOR_MILLIS 0</p><p>Then burn the bootloader &quot;ATtiny85 @ 16MHz (internal PLL;4.3V BOD)&quot;</p><p>If you accept donations I would gladly pay you two paints of beer, so let me know!</p>
Thanks man! I'm glad you found it useful :)<br> <br> That millis() thing is pretty odd. I must've missed it because I converted all my delay() and millis() calls into delayMicroseconds() and micros() in order to make the sketch fit in the flash! xD<br> <br> Curiously, if you examine the file Arduino\hardware\arduino\avr\cores\arduino\wiring.c there is a preprocessor statement:<br> `#if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)<br> ISR(TIM0_OVF_vect)<br> #else<br> ISR(TIMER0_OVF_vect)<br> #endif`<br> <br> This is the version of wiring.c which ships with the IDE by default, and it's quite odd that it checks for ATtiny*4 but not ATtiny*5. However in Arduino.h there is a statement which checks for both! I will raise this as an issue on the repo.<br> <br> As for beer, thanks for the offer (i &lt;3 beer) but the fact someone found my code useful is a reward in and of itself :)<br> Have a drink for me!
<p>Thanks seejaydee, I have finally a working prototype of an IR receiver for my<br>linux media center that I can program to work with most IR transmitters.</p><p>Your library and the library v-usb for arduino made the trick.</p><p>After reading the info that you posted before, I noticed as well differences for the attiny85 regarding the original configuration for the timer in the tiny core I linked before:</p><p>/*<br> For various reasons, Timer 1 is a better choice for the millis timer on the<br> '85 processor.<br>*/<br>#define TIMER_TO_USE_FOR_MILLIS 1</p><p>Only the attiny85 was configured to use interrupt1 for the millis timer, all the other micro-controllers where configured to use interrupt0.</p><p>Many people are having issues due to that very fact and I wonder why the developer of the core chose that configuration.</p><p>Thanks again for your cool code!</p>
<p>Hi!</p><p>I spent a lot of time with the library described in this tutorial... Finaly I managed to compile the code and uploade it to the attiny, but everytime I press a button of my remote, the code is 0. Maybe something is wrong with the library. I tried your library, but it gives an error when it is compiling:</p><p>core.a(wiring.c.o): In function `__vector_4':</p><p>C:\Users\User\Documents\Arduino\hardware\attiny\cores\tiny/wiring.c:78: multiple definition of `__vector_4'</p><p>tiny_IRremote\tiny_IRremote.cpp.o:C:\Users\Deana\Documents\Arduino\libraries\tiny_IRremote/tiny_IRremote.cpp:271: first defined here</p><p>I didnt find that __vector_4 anywhere... Can you pease help me?</p><p>I am using Arduino IDE 1.0.5 r2, the attiny cores described in this tutorial and the patch too.</p><p>Thanks!</p>
Hi, <br>What other libraries are you running? <br><br>tiny_IRremote uses Timer1, and it sounds like another of your libraries is also using that timer.<br><br>The error output is referring to line 78 of Arduino/Hardware/attiny/cores/tiny/wiring.c and line 271 of libraries/tiny_IRremote/tiny_IRremote.cpp<br><br>Tell me what code is on those lines and I will be able to help more. <br>If you haven't already got it, look up &quot;Notepad++&quot; and install it. It's great for editing code. <br><br>
<p>Thank you for the fast response.</p><p>I deleted everything. I instaled IDE 1.6.4 and the adafruit boards. The __vector4_ error doesn&acute;t appear anymore. But there is another error. The Trinket uses a bootloader, wich takes 3Kb of the flash memory, leaving 5Kb for the scketch, so I wasn&acute;t able to upload the scketch. I installed the attiny85 on the IDE following this tutorial: (It has allways worked for me with attiny85)</p><p><a href="http://highlowtech.org/?p=1695" rel="nofollow">http://highlowtech.org/?p=1695</a></p><p>And I was able to upload the code, but... the same thing... 0. Allways 0... on any button...0... For the reading I am using Software Serial library at 2400 baud rate and works fine.</p><p>The IR pin is 4 (on tue attiny). Power comes from an Arduino UNO, IR sensor works ok with arduino and original library.</p><p>Any suggestions?</p><p>Thanks againg.</p>
<p>Hello IV0 i am getting all buttons as 0 too :/ have you been able to solve the problem? thank you</p>
<p>see venumz's comment below</p>
<p>Hello maths_nerd. I didn't manage to solve the problem. I had to use an atmega328p with the regular IR arduino libaries to finish the proyect. If you have succes with this, please write me, I'm still interested in trying IR with an attiny.</p><p>Thank you!</p>
<p>See venumz's comment below</p>
I'm using Arduino 1.6.4 and set the board to &quot;Adafruit Trinket 8MHz&quot; (also uses the attiny85). I followed the instructions at https://learn.adafruit.com/adafruit-arduino-ide-setup/overview to add support for the attiny. You still need to &quot;upload using programmer&quot; etc<br><br>No &quot;patch&quot; either. This instructable is somewhat dated. Go to 1.6 you won't regret it.
<p>Its a Nice wqork</p>
<p>Was a bit of a pain to get this working, but well worth it. I have a few ideas for this and with the compact size of the trinket, this will work perfectly.</p>
<p>thank you very much I was able to complete my project...I had trouble with the last three sensors but with the first three sensors working perfectly...I'm working on the second project with PWM and i have big problems :)</p>
<p>Is it possible to provide an sketch example and the schematic? I followed this tutorial step by step using the the same IDE suggested version. The only part I made different is to burn the bootloader for an Atiny85 8Mhz using the 1.6.4 IDE version. My sketch seems to upload without any problem, but it doesn't work when I use the IR remote control.</p><p>This is my sketch:</p><p>typedef struct Buleanos {</p><p> int mibuleano; </p><p>} Buleano;</p><p>#include &lt;IRremote.h&gt;</p><p>int IR_Recv = 4; </p><p>int Led = 0;</p><p>Buleano bulPower;</p><p>IRrecv irrecv(IR_Recv);</p><p>decode_results results;</p><p>void setup(){</p><p> Serial.begin(9600); //starts serial communication</p><p> irrecv.enableIRIn(); // Starts the receiver</p><p> bulPower.mibuleano = 0; //0 off, 1 on</p><p> pinMode(Led, OUTPUT); </p><p>}</p><p>void loop(){</p><p> //decodes the infrared input</p><p> if (irrecv.decode(&amp;results)){</p><p> //long int decCode = results.value;</p><p> Serial.println(results.value, DEC);</p><p> //switch case to use the selected remote control button</p><p> switch (results.value){</p><p> case 3810010651: //power button</p><p> if (bulPower.mibuleano == 1) { //lights turn on</p><p> digitalWrite(Led, HIGH);</p><p> } </p><p> if (bulPower.mibuleano == 0) { //lights turn off</p><p> digitalWrite(Led, LOW);</p><p> } </p><p> if (bulPower.mibuleano == 0)</p><p> bulPower.mibuleano = 1;</p><p> else</p><p> bulPower.mibuleano = 0;</p><p> break;</p><p> default:</p><p> Serial.println(&quot;Waiting&quot;);</p><p> }</p><p> irrecv.resume(); // Receives the next value from the button you press</p><p> }</p><p>}</p><p>Thanks</p>
<p>I still have this error:</p><p>*****************************************************************</p><p>Arduino: 1.6.5 (Windows 8.1), Board: &quot;ATtiny, ATtiny45, 1 MHz (internal)&quot;</p><p>In file included from C:\arduino\libraries\IRremote\IRremote.cpp:13:0:</p><p>C:\arduino\libraries\IRremote\IRremoteInt.h:15:22: fatal error: WProgram.h: No such file or directory</p><p> #include &lt;WProgram.h&gt;</p><p>******************************************************************</p><p>I still can't make it work on tiny 45, even the cores and the libraries are installed...</p><p>any solution?!?!</p>
<p>Hey,</p><p>For this error :C:\arduino\libraries\IRremote\IRremoteInt.h:15:22: fatal error: WProgram.h: No such file or directory</p><p>#include &lt;WProgram.h&gt;</p><p>Go to library folder where your IR library for attiny is present , there go to Irremoteint.h ,,, in that library , change #include &lt;Wprogram.h&gt; to #include&lt;Arduino.h&gt;</p><p>It works for me</p>
<p>I found this page helpful too:</p><p>http://nathan.chantrell.net/20121014/tinypcremote-an-attiny85-based-infrared-pc-remote-control/</p>
<p>C:\Program Files\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope <br> int RECV_PIN = TKD2; // the pin the IR receiver is connected to <br> ^ <br>Error compiling.</p>
<p>If I remember correctly, this error raises when Arduino compiler mixes up our desired IRRemote library with RobotIRremote library, so all you have to do is <em>temporarily </em>removing RobotIRremote folder from <em>&quot;</em><em>C:\Program Files\Arduino\libraries\RobotIRremote&quot;</em>. Also make sure you've already copied IRRemote library to the path.</p>
I have an attiny84 and i am able to send the ir codes, but i cant get the reciever to work. i have the following code: <br>#include <br> <br>int RECV_PIN = 7; <br> <br>IRrecv irrecv(RECV_PIN); <br> <br>decode_results results; <br> <br>void setup() <br>{ <br> pinMode(9, OUTPUT); <br> irrecv.enableIRIn(); // Start the receiver <br>} <br> <br>void loop() { <br> if (irrecv.decode(&amp;results)) { <br> //Serial.println(results.value, HEX); <br> digitalWrite(9, HIGH); // turn the LED on (HIGH is the voltage level) <br> delay(1000); // wait for a second <br> digitalWrite(9, LOW); <br> irrecv.resume(); // Receive the next value <br> } <br>} <br> <br> <br> <br>I have an LED connected to pin 9 and the ir reciever conected to pin 7. <br>But the LED does not blink. <br>Hope someone can help me
<p>Your include statement on the first line has no parameters, change it to</p><p>#include &lt;IRremote.h&gt;</p>
<p>I get: error: 'volatile struct irparams_t' has no member named 'rawlen'</p>
<p>Hey I'm really sorry about the long reply I had lots to do . So does the error occur with the original IR library on the arduino Uno? And are you on a PC or Mac?</p>
wow idk its been a while ill see if i still get that
<p>I am getting the shame error, no matter what board i choose.And when I copy the hardware folder from tinyPCRELpatch into the hardware folder it doesnot ask me to replace anything.Why?????</p>
<p>Cool!</p><p>But I keep getting this error :</p><p>warning: 'TIMER2_COMPA_vect' appears to be a misspelled signal handler</p><p>This is for the IRrecvDemo sketch. My core is &quot;ATtiny85 (internal 8MHz clock)</p><p>This is the full error:</p><p>Arduino: 1.0.6 (Mac OS X), Board: &quot;ATtiny85 (internal 8 MHz clock)&quot;</p><p>/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=attiny85 -DF_CPU=8000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/luigipizzolito/Documents/Arduino/hardware/attiny/variants/tiny8 -I/Users/luigipizzolito/Documents/Arduino/libraries/IRremote /var/folders/gb/cl6mrjbs3vq4hz2wmlpvxprc0000gq/T/build2445791945727236569.tmp/IRrecvDemo.cpp -o /var/folders/gb/cl6mrjbs3vq4hz2wmlpvxprc0000gq/T/build2445791945727236569.tmp/IRrecvDemo.cpp.o </p><p>In file included from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h:26,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h:28,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:215,</p><p> from IRrecvDemo.ino:11:</p><p>/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h:32:1: warning: &quot;BIN&quot; redefined</p><p>In file included from /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/iotn85.h:38,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h:284,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h:82,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:27,</p><p> from IRrecvDemo.ino:11:</p><p>/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/iotnx5.h:55:1: warning: this is the location of the previous definition</p><p>/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=attiny85 -DF_CPU=8000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/luigipizzolito/Documents/Arduino/hardware/attiny/variants/tiny8 -I/Users/luigipizzolito/Documents/Arduino/libraries/IRremote -I/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/utility /Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp -o /var/folders/gb/cl6mrjbs3vq4hz2wmlpvxprc0000gq/T/build2445791945727236569.tmp/IRremote/IRremote.cpp.o </p><p>In file included from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h:26,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h:28,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:215,</p><p> from /Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremoteInt.h:20,</p><p> from /Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:20:</p><p>/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h:32:1: warning: &quot;BIN&quot; redefined</p><p>In file included from /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/iotn85.h:38,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h:284,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h:82,</p><p> from /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:27,</p><p> from /Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremoteInt.h:20,</p><p> from /Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:20:</p><p>/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/iotnx5.h:55:1: warning: this is the location of the previous definition</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:941: warning: this decimal constant is unsigned only in ISO C90</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRsend::mark(int)':</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:227: error: 'TCCR2A' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:227: error: 'COM2B1' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRsend::space(int)':</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:235: error: 'TCCR2A' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:235: error: 'COM2B1' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRsend::enableIROut(int)':</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:253: error: 'TIMSK2' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:263: error: 'TCCR2A' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:263: error: 'WGM20' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:263: error: 'TCCR2B' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:263: error: 'WGM22' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:263: error: 'CS20' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:263: error: 'OCR2A' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:263: error: 'OCR2B' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp: In member function 'void IRrecv::enableIRIn()':</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:279: error: 'TCCR2A' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:279: error: 'WGM21' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:279: error: 'TCCR2B' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:279: error: 'CS21' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:279: error: 'OCR2A' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:279: error: 'TCNT2' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:282: error: 'TIMSK2' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:282: error: 'OCIE2A' was not declared in this scope</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp: At global scope:</p><p>/Users/luigipizzolito/Documents/Arduino/libraries/IRremote/IRremote.cpp:311: warning: 'TIMER2_COMPA_vect' appears to be a misspelled signal handler </p>
<p>This actually works &amp; compiles. But what about sending IR codes? What pin is used for that?</p>
<p>thanks!</p>

About This Instructable

50,523views

241favorites

License:

More by rwhite19:Software PWM with arduino/attiny how to use the IR library with an attiny 
Add instructable to: