Trouble following Sending Sensor Data over LoRa tutorial

I’m currently trying to run the code found in the tutorial at https://learn.sparkfun.com/tutorials/se … -over-lora and I’m having trouble getting the code to compile. I’ve installed all of the proper libraries and even tried reverting RadioLib to previous versions without any success. The error I get is in the line,

SX1262 radio = new Module(D36, D40, D44, D39, SPI1); 

and the error I get is,

C:\Users\User\Downloads\Transmit-v3\Transmit-v3.ino:14:27: error: 'D36' was not declared in this scope
 SX1262 radio = new Module(D36, D40, D44, D39, SPI1);
                           ^~~
C:\Users\User\Downloads\Transmit-v3\Transmit-v3.ino:14:32: error: 'D40' was not declared in this scope
 SX1262 radio = new Module(D36, D40, D44, D39, SPI1);
                                ^~~
C:\Users\User\Downloads\Transmit-v3\Transmit-v3.ino:14:37: error: 'D44' was not declared in this scope
 SX1262 radio = new Module(D36, D40, D44, D39, SPI1);
                                     ^~~
C:\Users\User\Downloads\Transmit-v3\Transmit-v3.ino:14:42: error: 'D39' was not declared in this scope
 SX1262 radio = new Module(D36, D40, D44, D39, SPI1);
                                          ^~~

exit status 1

Compilation error: 'D36' was not declared in this scope

If anyone can help me figure out what’s going wrong here it would be much appreciated.

Where in your code are the variables D36, D40, etc. declared?

Are you using the MCU board and board definition that the tutorial expects?

I’m using the board and sensors that the tutorial expects. My setup is practically identical only has different antennae. I thought the declaration could be the issue but the tutorial made it sound like the code should run with no changes from what was on the site. If not, what am I supposed to declare them as? New to RadioLib and SparkFun boards.

what am I supposed to declare them as

Those would be the SPI pins used to communicate with the radio. Perhaps one or more of the libraries or Arduino board definition has been changed since the tutorial was written, and if so you will need to dig into the documentation.

I’ve checked all of the included libraries in the tutorial and used the ones that were available at the time the tutorial was written as well as the current ones. According to what I can see on the github there have been no major changes to the board definitions since the tutorial was written. There is no clear answer as to what I’m supposed to declare things as. Even when I used the example code for RadioLib I get a compilation error of

 In file included from c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\TypeDef.h:6,
                 from c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\ArduinoHal.h:2,
                 from c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\ArduinoHal.cpp:1:
c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\ArduinoHal.cpp: In member function 'virtual void ArduinoHal::pinMode(uint32_t, uint32_t)':
c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\BuildOpt.h:140:56: error: 'Arduino_PinMode' was not declared in this scope
   #define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST           (Arduino_PinMode)
                                                        ^~~~~~~~~~~~~~~
c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\ArduinoHal.cpp:29:18: note: in expansion of macro 'RADIOLIB_ARDUINOHAL_PIN_MODE_CAST'
   ::pinMode(pin, RADIOLIB_ARDUINOHAL_PIN_MODE_CAST mode);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\ArduinoHal.cpp: In member function 'virtual void ArduinoHal::digitalWrite(uint32_t, uint32_t)':
c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\BuildOpt.h:141:56: error: 'PinStatus' was not declared in this scope
   #define RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST         (PinStatus)
                                                        ^~~~~~~~~
c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\ArduinoHal.cpp:36:23: note: in expansion of macro 'RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST'
   ::digitalWrite(pin, RADIOLIB_ARDUINOHAL_PIN_STATUS_CAST value);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\ArduinoHal.cpp: In member function 'virtual void ArduinoHal::attachInterrupt(uint32_t, void (*)(), uint32_t)':
c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\BuildOpt.h:142:56: error: 'PinStatus' was not declared in this scope
   #define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST     (PinStatus)
                                                        ^~~~~~~~~
c:\Users\wolfh\Documents\Arduino\libraries\RadioLib\src\ArduinoHal.cpp:50:49: note: in expansion of macro 'RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST'
   ::attachInterrupt(interruptNum, interruptCb,  RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST mode);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1

And they have the line declared as

 SX1262 radio1 = new Module(10, 2, 3, 9);

Ive tried changing those numbers to correspond to different pins on the board and the error does not change

Update, I was able to find which pins correspond to what but I still get the same error when using those pins in the argument for new Modue()