Attiny45 IRremote Bibliothek Compilerfehler

Hallo zusammen,
ich möchte mithilfe eines Attiny45 und einer IR Fernbedienung ein Relais steuern. Dafür wird ja eine modifizierte IRremote-Bibliothek für Attinys benötigt, welche ich wie hier beschrieben gedownloadet habe.

Wenn ich jetzt einen Sketch mit dieser Bibliothek kompilieren möchte, kommt immer folgender Fehler:

In file included from C:\Users...\Documents\Arduino\libraries\IRremote\IRremote.cpp:13:0:
C:\Users...\Documents\Arduino\libraries\IRremote\IRremoteInt.h:15:10: fatal error: WProgram.h: No such file or directory
#include <WProgram.h>
^~~~~~~~~~~~
compilation terminated.
exit status 1
Fehler beim Kompilieren für das Board ATtiny25/45/85.

Wie kann ich das denn beheben? Ich kenn mich leider garnicht aus da ich relativ neu bin.

Da hast Du eine uralte Version erwischt.
Ersetze #include <WProgram.h> durch #include <Arduino.h> dann könnte es funktionieren, wenn nicht noch mehr Ecken drin sind.

Gruß Tommy

das habe ich gemacht, jetzt hab ich aber noch mehr Fehler bekommen:

C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:176:3: error: 'TCCR2A' was not declared in this scope
TCCR2A |= _BV(COM2B1); // Enable pin 3 PWM output
^~~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:176:3: note: suggested alternative: 'TCCR0A'
TCCR2A |= _BV(COM2B1); // Enable pin 3 PWM output
^~~~~~
TCCR0A
In file included from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\io.h:99:0,
from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\pgmspace.h:90,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:28,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:15,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:13:
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:176:17: error: 'COM2B1' was not declared in this scope
TCCR2A |= _BV(COM2B1); // Enable pin 3 PWM output
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:176:17: note: suggested alternative: 'COM1B1'
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:188:3: error: 'TCCR2A' was not declared in this scope
TCCR2A &= ~(_BV(COM2B1)); // Disable pin 3 PWM output
^~~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:188:3: note: suggested alternative: 'TCCR0A'
TCCR2A &= ~(_BV(COM2B1)); // Disable pin 3 PWM output
^~~~~~
TCCR0A
In file included from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\io.h:99:0,
from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\pgmspace.h:90,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:28,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:15,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:13:
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:188:19: error: 'COM2B1' was not declared in this scope
TCCR2A &= ~(_BV(COM2B1)); // Disable pin 3 PWM output
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:188:19: note: suggested alternative: 'COM1B1'
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:210:3: error: 'TIMSK2' was not declared in this scope
TIMSK2 &= ~_BV(TOIE2); //Timer2 Overflow Interrupt
^~~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:210:3: note: suggested alternative: 'TIMSK'
TIMSK2 &= ~_BV(TOIE2); //Timer2 Overflow Interrupt
^~~~~~
TIMSK
In file included from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\io.h:99:0,
from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\pgmspace.h:90,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:28,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:15,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:13:
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:210:18: error: 'TOIE2' was not declared in this scope
TIMSK2 &= ~_BV(TOIE2); //Timer2 Overflow Interrupt
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:210:18: note: suggested alternative: 'TOIE0'
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:228:3: error: 'TCCR2A' was not declared in this scope
TCCR2A = _BV(WGM20);
^~~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:228:3: note: suggested alternative: 'TCCR0A'
TCCR2A = _BV(WGM20);
^~~~~~
TCCR0A
In file included from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\io.h:99:0,
from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\pgmspace.h:90,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:28,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:15,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:13:
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:228:16: error: 'WGM20' was not declared in this scope
TCCR2A = _BV(WGM20);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:228:16: note: suggested alternative: 'WGM00'
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:229:3: error: 'TCCR2B' was not declared in this scope
TCCR2B = _BV(WGM22) | _BV(CS20);
^~~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:229:3: note: suggested alternative: 'TCCR0B'
TCCR2B = _BV(WGM22) | _BV(CS20);
^~~~~~
TCCR0B
In file included from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\io.h:99:0,
from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\pgmspace.h:90,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:28,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:15,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:13:
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:229:16: error: 'WGM22' was not declared in this scope
TCCR2B = _BV(WGM22) | _BV(CS20);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:229:16: note: suggested alternative: 'WGM02'
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:229:29: error: 'CS20' was not declared in this scope
TCCR2B = _BV(WGM22) | _BV(CS20);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:229:29: note: suggested alternative: 'CS00'
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:232:3: error: 'OCR2A' was not declared in this scope
OCR2A = SYSCLOCK / 2 / khz / 1000;
^~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:232:3: note: suggested alternative: 'OCR0A'
OCR2A = SYSCLOCK / 2 / khz / 1000;
^~~~~
OCR0A
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:233:3: error: 'OCR2B' was not declared in this scope
OCR2B = OCR2A / 3; // 33% duty cycle
^~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:233:3: note: suggested alternative: 'OCR0B'
OCR2B = OCR2A / 3; // 33% duty cycle
^~~~~
OCR0B
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:262:3: error: 'TCCR2A' was not declared in this scope
TCCR2A = 0; // normal mode
^~~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:262:3: note: suggested alternative: 'TCCR0A'
TCCR2A = 0; // normal mode
^~~~~~
TCCR0A
In file included from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\io.h:99:0,
from c:\program files\windowsapps\arduinollc.arduinoide_1.8.51.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\pgmspace.h:90,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:28,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:15,
from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:13:
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:267:7: error: 'TCCR2B' was not declared in this scope
cbi(TCCR2B,CS22);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:267:3: note: in expansion of macro 'cbi'
cbi(TCCR2B,CS22);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:267:7: note: suggested alternative: 'TCCR0B'
cbi(TCCR2B,CS22);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:267:3: note: in expansion of macro 'cbi'
cbi(TCCR2B,CS22);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:267:14: error: 'CS22' was not declared in this scope
cbi(TCCR2B,CS22);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:267:3: note: in expansion of macro 'cbi'
cbi(TCCR2B,CS22);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:267:14: note: suggested alternative: 'CS12'
cbi(TCCR2B,CS22);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:267:3: note: in expansion of macro 'cbi'
cbi(TCCR2B,CS22);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:268:14: error: 'CS21' was not declared in this scope
sbi(TCCR2B,CS21);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:268:3: note: in expansion of macro 'sbi'
sbi(TCCR2B,CS21);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:268:14: note: suggested alternative: 'CS01'
sbi(TCCR2B,CS21);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:268:3: note: in expansion of macro 'sbi'
sbi(TCCR2B,CS21);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:269:14: error: 'CS20' was not declared in this scope
cbi(TCCR2B,CS20);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:269:3: note: in expansion of macro 'cbi'
cbi(TCCR2B,CS20);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:269:14: note: suggested alternative: 'CS00'
cbi(TCCR2B,CS20);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:269:3: note: in expansion of macro 'cbi'
cbi(TCCR2B,CS20);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:272:7: error: 'TIMSK2' was not declared in this scope
sbi(TIMSK2,TOIE2);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:272:3: note: in expansion of macro 'sbi'
sbi(TIMSK2,TOIE2);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:272:7: note: suggested alternative: 'TIMSK'
sbi(TIMSK2,TOIE2);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:272:3: note: in expansion of macro 'sbi'
sbi(TIMSK2,TOIE2);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:272:14: error: 'TOIE2' was not declared in this scope
sbi(TIMSK2,TOIE2);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:272:3: note: in expansion of macro 'sbi'
sbi(TIMSK2,TOIE2);
^~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:272:14: note: suggested alternative: 'TOIE0'
sbi(TIMSK2,TOIE2);
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:272:3: note: in expansion of macro 'sbi'
sbi(TIMSK2,TOIE2);
^~~
In file included from C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:13:0:
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:46:24: error: 'TCNT2' was not declared in this scope
#define RESET_TIMER2 TCNT2 = INIT_TIMER_COUNT2
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:278:3: note: in expansion of macro 'RESET_TIMER2'
RESET_TIMER2;
^~~~~~~~~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:46:24: note: suggested alternative: 'TCNT0'
#define RESET_TIMER2 TCNT2 = INIT_TIMER_COUNT2
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:278:3: note: in expansion of macro 'RESET_TIMER2'
RESET_TIMER2;
^~~~~~~~~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp: In function 'void __vector_5()':
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:46:24: error: 'TCNT2' was not declared in this scope
#define RESET_TIMER2 TCNT2 = INIT_TIMER_COUNT2
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:308:3: note: in expansion of macro 'RESET_TIMER2'
RESET_TIMER2;
^~~~~~~~~~~~
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremoteInt.h:46:24: note: suggested alternative: 'TCNT0'
#define RESET_TIMER2 TCNT2 = INIT_TIMER_COUNT2
^
C:\Users\lukas\Documents\Arduino\libraries\IRremote\IRremote.cpp:308:3: note: in expansion of macro 'RESET_TIMER2'
RESET_TIMER2;
^~~~~~~~~~~~
exit status 1
Fehler beim Kompilieren für das Board ATtiny25/45/85.

Schau Dir mal diesen Beitrag an. Da geht es zwar um den 85 aber evtl. hilft es Dir. Etwas weiter unten gibt es auch den Code mit dem Link zur Lib.

Gruß Tommy