More difficult for me is understand interrupts, overflow, ticks, to find my way and the possible solution
the forum is crammed full of examples

search "blinky" to see some relevant ideas

perhaps if you provide more detailed information about what you are trying to achieve preferably with some examples of the code that you have tried , more help would be offered.
as it stands your goal is a mystery and worse still the goalposts seem to keep moving . speculation wastes everyone time and patience.
(I'm thinking now that an electronically variable gearbox might be your target , if so this approach is not going to work) but that's just speculation