Hello,
Please help. I downloaded the library from inventr.io/libraries for IR Remote. The code from the lesson doesn't compile. Please see error:
In file included from c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/IRremote.hpp:274,
from c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/IRremote.h:10,
from C:\Users\QuangPC\AppData\Local\Temp.arduinoIDE-unsaved20231118-8176-lk88mo.qhq5a\sketch_dec18a\sketch_dec18a.ino:1:
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp: In function 'void timerEnableReceiveInterrupt()':
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1375:5: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'?
1375 | timerAlarmEnable(s50usTimer);
| ^~~~
| timerAlarm
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp: In function 'void timerDisableReceiveInterrupt()':
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1394:9: error: 'timerAlarmDisable' was not declared in this scope
1394 | timerAlarmDisable(s50usTimer);
| ^~~~~
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp: In function 'void timerConfigForReceive()':
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1409:32: error: too many arguments to function 'hw_timer_t timerBegin(uint32_t)'
1409 | s50usTimer = timerBegin(1, 80, true);
| ~~^~~~~
In file included from C:\Users\QuangPC\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\cores\esp32/esp32-hal.h:84,
from C:\Users\QuangPC\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\cores\esp32/Arduino.h:36,
from C:\Users\QuangPC\AppData\Local\Temp\arduino\sketches\F7DE6E909C4D582CC1551C66BF7F8953\sketch\sketch_dec18a.ino.cpp:1:
C:\Users\QuangPC\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\cores\esp32/esp32-hal-timer.h:35:14: note: declared here
35 | hw_timer_t timerBegin(uint32_t frequency);
| ^~~~~~
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1410:29: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t, void ()())'
1410 | timerAttachInterrupt(s50usTimer, &IRReceiveTimerInterruptHandler, false); // false -> level interrupt, true -> edge interrupt, but this is not supported :-(
| ~~~~^~~~~~~~~~~~
C:\Users\QuangPC\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\cores\esp32/esp32-hal-timer.h:50:6: note: declared here
50 | void timerAttachInterrupt(hw_timer_t timer, void (userFunc)(void));
| ^~~~~~~~
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1411:9: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?
1411 | timerAlarmWrite(s50usTimer, MICROS_PER_TICK, true);
| ^~~~~~~
| timerWrite
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp: In function 'void timerConfigForSend(uint16_t)':
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1429:5: error: 'ledcSetup' was not declared in this scope
1429 | ledcSetup(SEND_AND_RECEIVE_TIMER_LEDC_CHANNEL, aFrequencyKHz * 1000, 8); // 8 bit PWM resolution
| ^~~~~
c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1433:5: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
1433 | ledcAttachPin(IrSender.sendPin, SEND_AND_RECEIVE_TIMER_LEDC_CHANNEL); // bind pin to channel
| ^~~~~
| ledcAttach
Hello, Please help. I downloaded the library from inventr.io/libraries for IR Remote. The code from the lesson doesn't compile. Please see error:
In file included from c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/IRremote.hpp:274, from c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/IRremote.h:10, from C:\Users\QuangPC\AppData\Local\Temp.arduinoIDE-unsaved20231118-8176-lk88mo.qhq5a\sketch_dec18a\sketch_dec18a.ino:1: c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp: In function 'void timerEnableReceiveInterrupt()': c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1375:5: error: 'timerAlarmEnable' was not declared in this scope; did you mean 'timerAlarm'? 1375 | timerAlarmEnable(s50usTimer); | ^
~~~| timerAlarm c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp: In function 'void timerDisableReceiveInterrupt()': c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1394:9: error: 'timerAlarmDisable' was not declared in this scope 1394 | timerAlarmDisable(s50usTimer); | ^~~~~ c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp: In function 'void timerConfigForReceive()': c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1409:32: error: too many arguments to function 'hw_timer_t timerBegin(uint32_t)' 1409 | s50usTimer = timerBegin(1, 80, true); |~~^~~~~ In file included from C:\Users\QuangPC\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\cores\esp32/esp32-hal.h:84, from C:\Users\QuangPC\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\cores\esp32/Arduino.h:36, from C:\Users\QuangPC\AppData\Local\Temp\arduino\sketches\F7DE6E909C4D582CC1551C66BF7F8953\sketch\sketch_dec18a.ino.cpp:1: C:\Users\QuangPC\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\cores\esp32/esp32-hal-timer.h:35:14: note: declared here 35 | hw_timer_t timerBegin(uint32_t frequency); | ^~~~~~ c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1410:29: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t, void ()())' 1410 | timerAttachInterrupt(s50usTimer, &IRReceiveTimerInterruptHandler, false); // false -> level interrupt, true -> edge interrupt, but this is not supported :-( |~~~~^~~~~~~~~~~~ C:\Users\QuangPC\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\cores\esp32/esp32-hal-timer.h:50:6: note: declared here 50 | void timerAttachInterrupt(hw_timer_t timer, void (userFunc)(void)); | ^~~~~~~~ c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1411:9: error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'? 1411 | timerAlarmWrite(s50usTimer, MICROS_PER_TICK, true); | ^~~~~~~ | timerWrite c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp: In function 'void timerConfigForSend(uint16_t)': c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1429:5: error: 'ledcSetup' was not declared in this scope 1429 | ledcSetup(SEND_AND_RECEIVE_TIMER_LEDC_CHANNEL, aFrequencyKHz * 1000, 8); // 8 bit PWM resolution | ^~~~~ c:\Users\QuangPC\Documents\Arduino\libraries\IRremote\src/private/IRTimer.hpp:1433:5: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'? 1433 | ledcAttachPin(IrSender.sendPin, SEND_AND_RECEIVE_TIMER_LEDC_CHANNEL); // bind pin to channel | ^~~~~ | ledcAttachexit status 1
Compilation error: exit status 1