The code has no errors and uploads completely fine and pins VCC and GND both have voltage however the OUT pins do not, I am not sure if this many be a problem with the L298n, or something else. Any ideas to debug it?
In this project I am not using the enable pins right now, and what is confusing me is that this project was working in the past. However now the OUT pins are not getting the voltage.
My wiring is the same from the tutorial I have provided but I have given it anyways:
I also tried with no battery as well it doesn't work by just connecting 5volts to VCC and I can't replicate the image shown as my battery has a plug that fits into arduino not wires
Time to show us a good schematic of your proposed circuit.
A pencil sketch will be fine.
Also:
In the Arduino IDE, use CtrlT or CMDT to format your code then copy the complete sketch.
Use the </> icon from the ‘reply menu’ to attach the copied sketch.
So that tutorial has a battery with direct connections to the 12V and GND on the L298 board. Is that what you have? Where is your battery? What type of battery? Or are you not actually following the tutorial?