Rotary Encoder to measure velocity

I find these statements incompatible:

I’m writing my bachelor in mechanical engineering

I’m totally new at programming, and don’t got the time to “fully” understand the coding language.

I find it difficult to believe that you've gotten through 4 years of an engineering degree without learning programming. A sad state. Good luck getting a job without being able to make a computer do what YOU want it to do. Or your employer wants it do to.