How to connect L298 to motors with arduino.

i recently bought L298 but i do not know how to connect it with motors and Arduino UNO R3.
This is the picture of my L298.If someone will help it will be thankful.
http://postimg.org/image/lolg1ej3h/
http://postimg.org/image/po3k7mvqd/
I am making a obstacle avoidance Robot With Arduino UNO R3,L298,2 Motor and hc sr04.

I also need coding for the robot.

You attach the motors to mt-1 and 2, and the MOTOR power to the one marked 12V and GND by the look of it.... or presumably 9V or whatever if your motor isn't 12V.

Then you put 5V on the EN of each motor: that can be hardwired 5V, or from an i/o pin, and it may be PWM'd for speed. Then put high / low or low / high on the cw / ccw pairs for direction.

Also take a wire from your 298 board GND to a GND on Arduino.

There is not GND in my l298 board.
You can see the images

http://postimg.org/image/lolg1ej3h/
http://postimg.org/image/po3k7mvqd/

Husnnain:
There is not GND in my l298 board.

Capture.PNG

What stands for cw and ccw and how to connect it with arduino

Husnnain:
What stands for cw and ccw and how to connect it with arduino

ClockWise and CounterClockWise.

You choose 4 digital pins and connect them to those cw and ccw pins; one pair is for each motor.

Then you use digitalWrite to set cw high / ccw low for one direction, and cw low / ccw high for the opposite.

You can connect the en pins (en = enable) to 5V for permanent enable, or to a digital pin for high / low (=enable / disable) or you can analogWrite from a PWM pin for speed control.

If all of the above doesn't make sense then you need to start here.

I have read it already but do not find the solution.I want to ask how to connect Arduino pin -10,-9,-5,4,-3,2 with En,ccw,cw,en,ccw,cw on my L298

Of course you won't find the solution there: you have to engineer the solution. You're an engineering student.... Don't expect answers off the shelf.

You chose 6 pins so connect them. If you want speed control make sure the en pins come from ~ pins. Or choose 4 pins and hardwire the en pins to 5V.

That said, you'll probably find some code in the playground.

For the physical connection on the 298 board I guess you'll need to get a plug that fits, or solder the wires on, or use clips.

I have a solder can you give me suggestion which pin i should connect to another

Husnnain:
I have a solder can you give me suggestion which pin i should connect to another

It doesn't matter. As long as you don't use 0 and 1, and if you need PWM make sure you use a pin marked ~.

Nagging me in PMs is not making me respond sooner by the way; indeed it's likely to piss me off very soon. And the other day you told me I was angry when you chased for an answer. Relax.... help on a forum comes when it comes, it's not a help desk.

(As it happens, it's Sunday night here, so I may well be offline soon......)

I simply want to say that help me with it what would you do if you were doing it.Its a request.plz

what would you do if you were doing it.

I just told you: it doesn't matter. Leave 0 and 1 alone. Use ~ pins if you need speed control via PWM.

Then you do a digitalWrite() or analogWrite() to whatever pin you chose.

I am trying to say give a example for that.

Umm - where's the heatsink for the L298? If you ever want a snowball's chance for the L298 to output it's maximum power, you are going to need a proper heatsink. Strangely, the board shows an outline for one; that said, most small heatsinks for the L298 are barely adequate...

Husnnain:
I am trying to say give a example for that.

If you need me or any other member to tell you how to set a pin high, then you very definitely need to go back here first.

Write some code, try it. If it works, cool. If not, come back with specific questions about what's wrong.

I'm a patient guy, but your continual PMs have used it all up.

cr0sh:
Umm - where's the heatsink for the L298?

I was loathe to mention that and the 298's inherent voltage drop to the OP......

Mr cr0sh can you do my help.....I have uploaded pictures.I want to have example for it.Like you can see Cw and CCw on my 928 board .i simply want to ask which pin i should choose or you will choose for connecting to the arduino UNO.

Husnnain:
Mr cr0sh can you do my help.....I have uploaded pictures.I want to have example for it.Like you can see Cw and CCw on my 928 board .i simply want to ask which pin i should choose or you will choose for connecting to the arduino UNO.

I'm out....

No man please help me out....

Husnnain:
No man please help me out....

I am NOT going to write you one line of code which is identical to the one that turns on the led in the blink sketch.

Have you worked through the examples? I'm thinking not, and if you don't you're doomed. If you did, well then you already know what to do.

And I won't pick your pins for you.....