How do I change base UNO timer interrupts to the Arduino UNO WiFi R4 timers?

We are trying to use our Arduino WiFi R4 as a receiver for our drone project, the signal comes from the flight controller and we want to use the arduino to transfer it with bluetooth to our phone using something like the Dabble app. The code we're using to achieve this comes from this tutorial: https://www.instructables.com/How-to-Control-Any-Drone-From-Your-Arduino-Microco/ . We are getting this error:

C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp: In member function 'void PPMEncoder::begin(uint8_t, uint8_t, boolean)':
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:39:3: error: 'TCCR1A' was not declared in this scope
   TCCR1A = 0;
   ^~~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:41:3: error: 'OCR1A' was not declared in this scope
   OCR1A = 100;
   ^~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:42:3: error: 'TCCR1B' was not declared in this scope
   TCCR1B = (1 << WGM12) | (1 << CS11);
   ^~~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:42:18: error: 'WGM12' was not declared in this scope
   TCCR1B = (1 << WGM12) | (1 << CS11);
                  ^~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:42:33: error: 'CS11' was not declared in this scope
   TCCR1B = (1 << WGM12) | (1 << CS11);
                                 ^~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:42:33: note: suggested alternative: 'CS'
   TCCR1B = (1 << WGM12) | (1 << CS11);
                                 ^~~~
                                 CS
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:43:3: error: 'TIMSK1' was not declared in this scope
   TIMSK1 = (1 << OCIE1A); // enable timer compare interrupt
   ^~~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:43:18: error: 'OCIE1A' was not declared in this scope
   TIMSK1 = (1 << OCIE1A); // enable timer compare interrupt
                  ^~~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp: In member function 'void PPMEncoder::interrupt()':
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:58:3: error: 'TCNT1' was not declared in this scope
   TCNT1 = 0;
   ^~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:58:3: note: suggested alternative: 'SCNd16'
   TCNT1 = 0;
   ^~~~~
   SCNd16
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:62:5: error: 'OCR1A' was not declared in this scope
     OCR1A = PPM_PULSE_LENGTH_uS * 2;
     ^~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:70:7: error: 'OCR1A' was not declared in this scope
       OCR1A = (PPM_FRAME_LENGTH_uS - elapsedUs) * 2 - err;
       ^~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:73:7: error: 'OCR1A' was not declared in this scope
       OCR1A = (channels[currentChannel] - PPM_PULSE_LENGTH_uS) * 2 - err;
       ^~~~~
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp: At global scope:
C:\Users\Admin\Downloads\Drone_Controller\Drone_Controller\PPMEncoder.cpp:83:4: error: expected constructor, destructor, or type conversion before '(' token
 ISR(TIMER1_COMPA_vect) {
    ^

exit status 1

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

Our understanding of timer interupts is very limited but we've figured out that these timers can't be used for the R4 board and should be formed differently, this is the forum post: https://forum.arduino.cc/t/tccr1a-not-declared-in-this-scope/892894. We already changed cli() and sei() to noInterrupts() and interrupts(). Could anyone help us with changing this code into R4 suited code?
Thanks in advance.

We can barely grasp the code from the tutorial, where would we begin with rewriting this? As for the BLE, that’s a bummer. I don’t suppose we can somehow use the WiFi functionality to connect it to our iPhones?

Maybe something here

Is there a separate library somewhere for encoding/decoding PPM, preferably in a more readily modifiable form? (Hmm - maybe: Arduino Ppm Library "radio Control" )
Even a non-blocking for of pulseIn() would be a big step in the right direction...
(I mean, it tends to be a basic capability of most timer peripherals, even if they all do it differently.)
What about "generic timer" libraries. "readPulse", "sendPulse", etc...

You'd need to go and study the ATMega 328 datasheet deep enough to truly understand the timer code you have

Nonsense. You only need to understand what it's DOING. Once you understand that, It'd probably be easier to re-write from scratch than to "translate" the existing code.
(alas, you still need to understand the horrible RA4 datasheet. Probably. Questions like "how do I get the xyx3 timer on an RA4 to generate a pulse from 500 to 2000 us with a resolution of at least 10us?" are much easier for the people who do understand the datasheet to answer, compared to "how do I port this drone library?" This is what libraries are all about!)

Or for ESP32 PPM encoding:

@Delta_G I will post the code now, should've done so when making the post.
PPMEncoder.h

/* This is the header file, the only things that might need to be changed are:
 * PPM_DEFAULT_CHANNELS - This is the number of channels that you want to have on the drone
 * PPM_PULSE_LENGTH_uS - This is the length of the pulse, you might have to play around with the variable find the correct value
 * PPM_FRAME_LENGTH_uS - This is the length of the separation pause. The larger the value, the more stable the readings and the higher the latency, but
 *                       the lower the value, the less stable the readings and a lower latency. Try play around with this value until you find your sweet spot.
 */
#ifndef _PPMEncoder_h_
#define _PPMEncoder_h_

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

#define PPM_DEFAULT_CHANNELS 8

#define PPM_PULSE_LENGTH_uS 25
#define PPM_FRAME_LENGTH_uS 40000

class PPMEncoder {

  private:
    int16_t channels[10];
    int16_t err;
    uint16_t elapsedUs;

    uint8_t numChannels;
    uint8_t currentChannel;
    byte outputPin;
    boolean state;
  
    uint8_t onState;
    uint8_t offState;


  public:
    static const uint16_t MIN = 1000;
    static const uint16_t MAX = 2000;

    void setChannel(uint8_t channel, uint16_t value);
    void setChannelPercent(uint8_t channel, uint8_t percent);

    void begin(uint8_t pin);
    void begin(uint8_t pin, uint8_t ch);
    void begin(uint8_t pin, uint8_t ch, boolean inverted);

    void interrupt();
};

extern PPMEncoder ppmEncoder;

#endif

PPMEncoder.cpp

#include "Arduino.h" 
/* This is the main code of the program. The only value that might need to be changed is:
 *  err - This value will help you trim the fluctuating readings that you may get on betaflight even when you are not transmitting any values. 8 worked extremely well for me
 */
#include "PPMEncoder.h"

PPMEncoder ppmEncoder;

void PPMEncoder::begin(uint8_t pin) {
  begin(pin, PPM_DEFAULT_CHANNELS, false);
}

void PPMEncoder::begin(uint8_t pin, uint8_t ch) {
  begin(pin, ch, false);
}

void PPMEncoder::begin(uint8_t pin, uint8_t ch, boolean inverted) {
  noInterrupts(); // noInterrupts = cli, interrupts = sei

  // Store on/off-State in variable to avoid another if in timing-critical interrupt
  onState = (inverted) ? HIGH : LOW;
  offState = (inverted) ? LOW : HIGH;
  
  pinMode(pin, OUTPUT);
  digitalWrite(pin, offState);

  err = 8;
  state = true;
  elapsedUs = 0;
  currentChannel = 0;

  numChannels = ch;
  outputPin = pin;

  for (uint8_t ch = 0; ch < numChannels; ch++) {
    setChannelPercent(ch, 0);
  }

  TCCR1A = 0;

  OCR1A = 100;
  TCCR1B = (1 << WGM12) | (1 << CS11);
  TIMSK1 = (1 << OCIE1A); // enable timer compare interrupt

  interrupts();
}

void PPMEncoder::setChannel(uint8_t channel, uint16_t value) {
  channels[channel] = constrain(value, PPMEncoder::MIN, PPMEncoder::MAX);
}

void PPMEncoder::setChannelPercent(uint8_t channel, uint8_t percent) {
  percent = constrain(percent, 0, 100);
  setChannel(channel, map(percent, 0, 100, PPMEncoder::MIN, PPMEncoder::MAX));
}

void PPMEncoder::interrupt() {
  TCNT1 = 0;

  if (state) {
    digitalWrite(outputPin, onState);
    OCR1A = PPM_PULSE_LENGTH_uS * 2;

  } else {
    digitalWrite(outputPin, offState);

    if (currentChannel >= numChannels) {
      currentChannel = 0;
      elapsedUs = elapsedUs + PPM_PULSE_LENGTH_uS;
      OCR1A = (PPM_FRAME_LENGTH_uS - elapsedUs) * 2 - err;
      elapsedUs = 0;
    } else {
      OCR1A = (channels[currentChannel] - PPM_PULSE_LENGTH_uS) * 2 - err;
      elapsedUs = elapsedUs + channels[currentChannel];

      currentChannel++;
    }
  }

  state = !state;
}

ISR(TIMER1_COMPA_vect) {
  ppmEncoder.interrupt();
}

Drone_Controller.ino

#include "PPMEncoder.h"

//Choose either pin 2 or pin 3 because they are interrupt pins. On other boards you can use any pin that has an interrupt
#define OUTPUT_PIN 3 

// This value will store the input from the Bluetooth Controller
char state = '0';     

// These variables represent the values of each channel, from 1 - 8. You can change how many variables you have depending on the number of channels you have.
int v1 = 50,v2 = 50,v3 = 0,v4 = 50,v5 = 0, v6= 0, v7 = 0, v8 = 0;

//These are the values used to increment or decrement each channel's percent when they are triggered by your input.
int inc1 = 2, inc2 = 2, inc3 = 2, inc4 = 2;

void setup() {
  //Begin serial communication.
  Serial.begin(9600);
  
  //Configure and initiate the encoder. The encoder will send the PPM Signals to the drone.
  ppmEncoder.begin(OUTPUT_PIN);
  
  //Set default values so that the drone start abruptly. 
  //This is how to set values of each channel: ppmEncoder.setChannelPercent(channel, percent). The channels are 0-indexed (so they start at 0) and the percent is from 1-100.
  ppmEncoder.setChannelPercent(0, 50);
  ppmEncoder.setChannelPercent(1, 50);
  ppmEncoder.setChannelPercent(3, 50);
}

void loop() {

  if(Serial.available() > 0){
    state = Serial.read();
     switch(state){
      //This controls the throttle value, +inc3 (+2%).
      case 'U': v3 += inc3; v3 = min(v3, 100); ppmEncoder.setChannelPercent(2, v3); break; 
      
      //This controls the throttle value, -inc3 (-2%).
      case 'D': v3 -= inc3; v3 = max(v3, 0); ppmEncoder.setChannelPercent(2, v3); break; 
      
      //This controls the yaw value, -inc4 (-2%). The rate at which drone will turn left.
      case 'T': (v4 > 50) ? v4 = 50 + inc4: v4 = v4;v4 -= inc4; v4 = max(v4, 0); ppmEncoder.setChannelPercent(3, v4);break; 
      
      //This controls the yaw value, +inc4 (+2%). The rate at which the drone will roll right.
      case 'X': (v4 < 50) ? v4 = 50 - inc4: v4 = v4;v4 += inc4; v4 = min(v4, 100); ppmEncoder.setChannelPercent(3, v4);break; 
      
      //This controls the pitch, +inc2 (+2%) The rate at which the drone will pitch downwards.
      case 'F': (v2 < 50) ? v2 = 50 - inc2: v2 = v2;v2 += inc2; v2 = min(v2, 100); ppmEncoder.setChannelPercent(1, v2);break; 
      
      //This controls the pitch, -inc2 (-2%). The rate at which the drone will pitch upwards.
      case 'B': (v2 > 50) ? v2 = + inc2: v2 = v2;v2 -= inc2; v2 = max(v2, 0); ppmEncoder.setChannelPercent(1, v2);break; 
      
      //This controls the roll, -inc1 (-2%). The rate at which the drone will roll left.
      case 'L': (v1 > 50) ? v1 = 50 + inc1: v1 = v1;v1 -= inc1; v1 = max(v1, 0); ppmEncoder.setChannelPercent(0, v1);break; 
      
      //This controls the roll, +inc1 (+2%). The rate at which the drone will roll right.
      case 'R': (v1 < 50) ? v1 = 50 - inc1: v1 = v1;v1 += inc1; v1 = min(v1, 100); ppmEncoder.setChannelPercent(0, v1);break; 

      //This controls Aux1
      case '1': if(v5 == 100){ 
        v5 = 0;
        ppmEncoder.setChannelPercent(4, v5);
      }
      else{
        v5 = 100;
        v1 = 50, v2 = 50, v3 = 0, v4 = 50;
        ppmEncoder.setChannelPercent(0, v1);
        ppmEncoder.setChannelPercent(1, v2);
        ppmEncoder.setChannelPercent(2, v3);
        ppmEncoder.setChannelPercent(3, v4);
        ppmEncoder.setChannelPercent(4, v5);
      }
      break;

      //This controls Aux2
      case '2': (v6 == 100) ? v6 = 0 : v6 = 100; ppmEncoder.setChannelPercent(5, v6);break;

      //This controls Aux3
      case '3': (v7 == 50) ? v7 = 0 : v7 = 50; ppmEncoder.setChannelPercent(6, v7); break;

      //This controls Aux4
      case '4': (v8 == 100) ? v8 = 0 : v8 = 100; ppmEncoder.setChannelPercent(7, v8); break;
     }
     //Print the input, this is to check that everything is functioning correctly
     //Serial.println(state);
}
}