Hi Guys, I am trying to connect my motor to L298 and Arduino but it is not responding at all( not even vibrating)
Did I wire the motor wrong or is L298 broken?
You code isn't putting anything on the ENx pins since all the ENx stuff is //'d out. So have they got 5V hardwired? (Impossible to tell from the photos.)
Yeah i commented out ENx coz I want to check is motor is working first..What do you mean if 5V is hardwired? You mean the 5v output in L298? I did't touch it as I dont need it power my arduino.
The 298 won't provide any output is there's no 5V on either or both ENx pins. The ENx pins are not only for PWM; they need to have 5V on them either solid on or PWM. That 5V can either be under the control of your sketch via an i/o pin, or be hardwired from a 5V source if it doesn't need to be controlled.
Some boards (and by the way you don't have an "L298" you have an "L298 module" with other stuff on there) allow you to wire or jumper 5V to the ENx pins easily. Before I gave up on L298s and moved to the new century, I used a MotoMama which had such pins.
Bottom line is, one way or the other, you need 5V (either solid or PWM) to ENable (clue's in the name ) the L298's output/s.