L298 different output voltages

That was easy wasn't it ?
Aren't you glad it wasn't a hardware problem ?
Now you see why I asked you to post your code ?