I am making a circuit to control a motor using an Arduino UNO and an H-bridge IC, but it's not working, rather something strange is happening.
When the motor is connected to pins 3 and 6 of the H-bridge nothing happens, but strangely when one of the motor's wires is connected to either 3 or 6 pins of the H-bridge, and the other wire of the motor is connected to ground the motor works! But I can't control it's speed with the potentiometer, neither control it's direction, or even it off using the push-buttons.
I suppose that the H-bridge deliver power to it's 3 and 6 pins because the motor works when connected to ground and one of them, but this shouldn't happen, one of the pins (3 and 6) should deliver power and the other should be ground, that's what I think.
How can I solve this problem?
Edit: For some reason the wires connecting Arduino pin 2 with H-bridge pin 7 won't deliver 5 power unless I was touching the wire with my finger, (this also happen in the wire between Arduino pin 3 and H-bridge pin 2) I've tried connecting the pins with other wires, but the same thing happens, also I've used an 220Ω resistor and the problem is still happening. this thing happens with all Arduino pins, not just 2 and 3, but in before this project they were working very well. O_o