Is there and easy way to implement a timer interrupt on the Opta?
You can use Timer modules from Mbed Os ( Time, Timeout,Ticker etc )
I have used Timeout like that
#include <Timeout.h>
mbed::Timeout t1;
t1.attach(timeout_isr_1, 0.01);
void timeout_isr_1(){
bool pin_state_now = digitalRead(PULSE_PIN_1);
if(pin_state_now == LOW){
pulse_counter_1++;
}
}