Compile error: spi.h, attachinterrupt() arduino nano esp32

I am trying to make work a very trivial transmitter code in arduino nano esp32.
The same code works in arduino uno R4.
When I change, however, the board however in the ide, the same code doesn't compile. I haven't even connected the board yet.

The following is the error I get. Does anyone have an idea?
I did have problems before to make the code work with the arduino uno R4 as well. Replacing the radiohead library that I installed from the arduino ide library with the folders that i downloaded from the github repository worked. This time, i do not have much ideas!

macro "attachInterrupt" requires 3 arguments, but only 1 given
virtual void attachInterrupt() {};

The code I am trying to compile is the following.


#include <RH_ASK.h>
// Include dependant SPI Library 
#include <SPI.h> 

RH_ASK rf_driver;
 
void setup()
{
    // Initialize ASK Object
    rf_driver.init();
    pinMode(LED_BUILTIN, OUTPUT);
    int status = 0;
}
 
void loop()
{
    const char *msg = "hello skynet";
    rf_driver.send((uint8_t *)msg, strlen(msg));
    rf_driver.waitPacketSent();
    digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
    delay(1000);                      // wait for a second
    digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
    delay(1000);                      // wait for a second
}

Welcome to the forum

Please post the full error message copied from the IDE using the button provide for the purpose

When posting it please put it in code tags to avoid it being displayed wrongly by the forum software

You can safely delete that line!

here is the complete error message that i have got! Hope it helps!!
Thanks for the warm welcome. I will be careful with the code tags next time. Thank you!

In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHSoftwareSPI.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSoftwareSPI.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:34: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     virtual void attachInterrupt() {};
                                  ^
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:37: error: variable or field 'attachInterrupt' declared void
     virtual void attachInterrupt() {};
                                     ^
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSoftwareSPI.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSoftwareSPI.cpp:6:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:122:18: note: in expansion of macro 'detachInterrupt'
     virtual void detachInterrupt() {};
                  ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:34: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     virtual void attachInterrupt() {};
                                  ^
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:66:26: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     void attachInterrupt();
                          ^
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:37: error: variable or field 'attachInterrupt' declared void
     virtual void attachInterrupt() {};
                                     ^
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.cpp:6:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:122:18: note: in expansion of macro 'detachInterrupt'
     virtual void detachInterrupt() {};
                  ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:66:10: error: variable or field 'attachInterrupt' declared void
     void attachInterrupt();
          ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.cpp:6:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:70:10: note: in expansion of macro 'detachInterrupt'
     void detachInterrupt();
          ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.cpp:7:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:34: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     virtual void attachInterrupt() {};
                                  ^
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.cpp:7:
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:66:26: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     void attachInterrupt();
                          ^
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.cpp:76:37: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
 void RHHardwareSPI::attachInterrupt()
                                     ^
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.cpp:7:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:37: error: variable or field 'attachInterrupt' declared void
     virtual void attachInterrupt() {};
                                     ^
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.cpp:7:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:122:18: note: in expansion of macro 'detachInterrupt'
     virtual void detachInterrupt() {};
                  ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.cpp:7:
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:66:10: error: variable or field 'attachInterrupt' declared void
     void attachInterrupt();
          ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.cpp:7:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:70:10: note: in expansion of macro 'detachInterrupt'
     void detachInterrupt();
          ^~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.cpp:76:21: error: variable or field 'attachInterrupt' declared void
 void RHHardwareSPI::attachInterrupt()
                     ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:34: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     virtual void attachInterrupt() {};
                                  ^
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:66:26: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     void attachInterrupt();
                          ^
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:37: error: variable or field 'attachInterrupt' declared void
     virtual void attachInterrupt() {};
                                     ^
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.cpp:6:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:122:18: note: in expansion of macro 'detachInterrupt'
     virtual void detachInterrupt() {};
                  ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:66:10: error: variable or field 'attachInterrupt' declared void
     void attachInterrupt();
          ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSPIDriver.cpp:6:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:70:10: note: in expansion of macro 'detachInterrupt'
     void detachInterrupt();
          ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.cpp:7:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:34: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     virtual void attachInterrupt() {};
                                  ^
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:37: error: variable or field 'attachInterrupt' declared void
     virtual void attachInterrupt() {};
                                     ^
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.cpp:7:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:122:18: note: in expansion of macro 'detachInterrupt'
     virtual void detachInterrupt() {};
                  ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHSUBGHZSPI.h:8,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSUBGHZSPI.cpp:6:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:34: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     virtual void attachInterrupt() {};
                                  ^
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:37: error: variable or field 'attachInterrupt' declared void
     virtual void attachInterrupt() {};
                                     ^
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSUBGHZSPI.h:8,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHSUBGHZSPI.cpp:6:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:122:18: note: in expansion of macro 'detachInterrupt'
     virtual void detachInterrupt() {};
                  ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.h:17,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.cpp:8:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:34: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     virtual void attachInterrupt() {};
                                  ^
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.h:17,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.cpp:8:
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:66:26: error: macro "attachInterrupt" requires 3 arguments, but only 1 given
     void attachInterrupt();
                          ^
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.h:17,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.cpp:8:
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:118:37: error: variable or field 'attachInterrupt' declared void
     virtual void attachInterrupt() {};
                                     ^
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.h:17,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.cpp:8:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHGenericSPI.h:122:18: note: in expansion of macro 'detachInterrupt'
     virtual void detachInterrupt() {};
                  ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:10,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.h:17,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.cpp:8:
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:66:10: error: variable or field 'attachInterrupt' declared void
     void attachInterrupt();
          ^~~~~~~~~~~~~~~
In file included from /home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/Arduino.h:223,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RadioHead.h:1592,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHGenericDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RHNRFSPIDriver.h:9,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.h:17,
                 from /home/karthikeyan/Arduino/libraries/RadioHead/RH_CC110.cpp:8:
/home/karthikeyan/.arduino15/packages/arduino/hardware/esp32/2.0.13/cores/esp32/io_pin_remap.h:45:69: error: 'digitalPinToGPIONumber' is not a type
 #define detachInterrupt(pin)                        detachInterrupt(digitalPinToGPIONumber(pin))
                                                                     ^~~~~~~~~~~~~~~~~~~~~~
/home/karthikeyan/Arduino/libraries/RadioHead/RHHardwareSPI.h:70:10: note: in expansion of macro 'detachInterrupt'
     void detachInterrupt();
          ^~~~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1

If you installed a library for R4, is not a surprise that it not works with classic Nano

Using the Radiohead libray V1.122.1 fromrr library manager, your code compiles for an classic Nano.

There are a few Radiohead libraries on github; which one did you install? I think that this is the same one as in library manager: GitHub - epsilonrt/RadioHead: Packet Radio library for embedded microprocessors

I have an arduino nano esp32.

i downloaded the one in the following link:

The fact that there are so many boards with Nano in their name certainly is confusing, especially when users refer to all of them as simply a Nano without clarifying which one they are using

I did a quick compare of the official library and the mcauser library and although I could spot some differences, it's a bit too much for me to dig through.

Adding to that, I can not install the board package for the Nano ESP32 because I'm running a 32 bit system.

thank you very much for trying though.
Just out of curiosity, were you looking for something in particular?
Just so that I know in future what to look for in differences

I am not sure to understand the intention of the message.
If my message was not precise enough, I bought the board from arduino store. Here below is the link to it (hoping the site would certainly provide important information that I have left out)

i will try to look whether there is a specific radiohead library for this board.

Just differences and from there try to analyse it.

The problem is that you mentioned "Nano"; that basically implies the classic Nano, not one of the many newer versions (Nano Every, Nano 33 ... or Nano ESP32). So next time please mention the exact Nano that you're using :slight_smile:

1 Like

thank you. I have edited the very first message to be clear.

I have found another post(link below) in another forum where someone else seemed to have had the same problem with the radiohead library in application to nano esp32. The error he/she gets seem to be overlap perfectly with mine. The thread was closed. I don't think the problem was solved.

https://forums.adafruit.com/viewtopic.php?p=994581&sid=03897c6e2e31c72bd8e5c2d7529b6ec6#p994581

If I want to fix the code myself, where would you advise me to start? I am new to this sort of work. I am very excited, however, to learn a lot of things on the way in such a process.

The problem is that the ESP32 core defines attachInterrupt and detachInterrupt as macros. Things go south when RadioHead defines its own attachInterrupt and detachInterrupt methods.

io_pin_remap.h:#define attachInterruptArg(pin, fcn, arg, mode) attachInterruptArg(digitalPinToGPIONumber(pin), fcn, arg, mode)
io_pin_remap.h:#define attachInterrupt(pin, fcn, mode)         attachInterrupt(digitalPinToGPIONumber(pin), fcn, mode)
io_pin_remap.h:#define detachInterrupt(pin)                    detachInterrupt(digitalPinToGPIONumber(pin))

thank you very much. that's a good starting point for me