Nope the pins are correct. The diagram I posted was just taken from Google as I hv never worked with fritzig before. I also tried a digitalWrite low on 8.
I wonder what's wrong with my h bridge which considers a logic 0 to be different from ground
Hi, sorry, pins 3,4 9 are output, 2 is input.
Also just spotted, pin 16 on L293D should be connected to 5V not the motor 9V supply.
With 9V logic, the 293 will need 9V from arduino to indicate a HIGH.
So disconnect pin16 from the battery and connect it to the 5V from the arduino.
Tom.... (Good spot justone, must have had a HomerSimpson moment when I looked at the differences, just given you a karma, congratulations)
^Even the above circuit didnt work. Then I just connected my multimeter between input 1 of the H bridge, and ground to measure the voltage, and my car started moving all of a sudden and fell off the table along with the breadboard.
So I connected 2 10K resistors in parallel, between each of the 2 input pins of the h bridge and ground, and it works as expected. The enable pin somehow works even without the resistor.
Can you tell me why the resistors are needed? And why the pwm input works just fine without any resistor? I just made it work by hit and trial. I havent seen resistors attached anywhere on the internet.