The error I am getting while I am running the code (RADIOHEAD)

C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::attachInterrupt()':
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:77:25: error: 'virtual void SPIClassMegaAVR::attachInterrupt()' is private within this context
SPI.attachInterrupt();
^
In file included from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RadioHead.h:1517:0,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RHGenericSPI.h:10,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RHHardwareSPI.h:10,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:7:
C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\libraries\SPI\src/SPI.h:186:15: note: declared private here
inline void attachInterrupt() { SPI0.INTCTRL |= (SPI_IE_bm); }
^~~~~~~~~~~~~~~
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::detachInterrupt()':
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:84:25: error: 'virtual void SPIClassMegaAVR::detachInterrupt()' is private within this context
SPI.detachInterrupt();
^
In file included from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RadioHead.h:1517:0,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RHGenericSPI.h:10,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RHHardwareSPI.h:10,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:7:
C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\libraries\SPI\src/SPI.h:187:15: note: declared private here
inline void detachInterrupt() { SPI0.INTCTRL &= ~(SPI_IE_bm); }
^~~~~~~~~~~~~~~
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp: In member function 'void RH_ASK::timerSetup()':
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:463:5: error: 'TCCR1A' was not declared in this scope
TCCR1A = 0; // Output Compare pins disconnected
^~~~~~
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:463:5: note: suggested alternative: 'TCB1'
TCCR1A = 0; // Output Compare pins disconnected
^~~~~~
TCB1
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:464:5: error: 'TCCR1B' was not declared in this scope
TCCR1B = _BV(WGM12); // Turn on CTC mode
^~~~~~
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:464:5: note: suggested alternative: 'TCB1'
TCCR1B = _BV(WGM12); // Turn on CTC mode
^~~~~~
TCB1
In file included from c:\users\vemanth chandra\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\vemanth chandra\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\pgmspace.h:90,
from C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/api/String.h:31,
from C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/api/IPAddress.h:24,
from C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/api/ArduinoAPI.h:30,
from C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/Arduino.h:23,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RadioHead.h:1513,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RHGenericDriver.h:9,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RH_ASK.h:9,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:6:
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:464:18: error: 'WGM12' was not declared in this scope
TCCR1B = _BV(WGM12); // Turn on CTC mode
^
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:471:5: error: 'OCR1A' was not declared in this scope
OCR1A = nticks;
^~~~~
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:478:5: error: 'TIMSK' was not declared in this scope
TIMSK |= _BV(OCIE1A);
^~~~~
In file included from c:\users\vemanth chandra\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\vemanth chandra\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\pgmspace.h:90,
from C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/api/String.h:31,
from C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/api/IPAddress.h:24,
from C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/api/ArduinoAPI.h:30,
from C:\Users\Vemanth chandra\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/Arduino.h:23,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RadioHead.h:1513,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RHGenericDriver.h:9,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead/RH_ASK.h:9,
from C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:6:
C:\Users\Vemanth chandra\OneDrive\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:478:18: error: 'OCIE1A' was not declared in this scope
TIMSK |= _BV(OCIE1A);
^

exit status 1

Compilation error: exit status 1

this is the error i am getting when i am trying to run the code. How do i resolve this?

First, verify that RadioHead supports whatever Arduino you are using. Then, select the correct board in the Arduino IDE.

In the future, before posting again, please read and follow the directions in the "How to get the best out of this forum" post.

Welcome!

Can you edit your post from first line to the second last line to be shown as code? Just mark the whole text and click on the button.

I moved your topic to an appropriate forum category @vemanthchandrap.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.