Control DC motor with encoder using serial monitor

I'm also using L298N to control the DC motor