arduino uno and L293D IC help....noob here

Guys I need to control speed and Rotation direction of my 12v DC motor 60rpm. been trying for ages i am very new to arduino..
if some one will be kind enough to provide the code and schematic of the circuit and connections to the arduino uno.. it will be awesome.. i already purchase L293D H-Bridge IC.. i followed this: youtube video but still out of luck..i am thinking maybe the power is not enough i was using separate power on arduino uno USB, and a 1.2v AA Battery in to 8 total 9.6v but the motor wont run... i tried to plug directly to batteries and it works like a charm but if i connect it to the bread board and arduino uno nothing happens...

this is the youtube video..

hopping that you could help me with this...

if some one will be kind enough to provide the code and schematic of the circuit and connections to the arduino uno.. it will be awesome..

Read as :
I spent 10 minutes and couldn't find anything on the web. Can somebody please do my homework for me so I can go out and party!
?
FYI - If you want to learn, you came to the right place. If you want to goof off while we do your homework, find another forum.
If you want to learn, post the datasheet and ask a question. It's your job to draw the schematic (if you read the datasheet you wouldn't be asking that question) and it's your job to research how to "talk" to an L293 with an arduino.

tried to plug directly to batteries and it works like a charm but if i connect it to the bread board and arduino uno nothing happens...

I need to control speed and Rotation direction of my 12v DC motor 60rpm.

.i am thinking maybe the power is not enough i was using separate power on arduino uno USB, and a 1.2v AA Battery in to 8 total 9.6v but the motor wont run.

Really ? Where is your code ? Post the code your were using.

Post your code.

const int controlPin1 =2;
const int controlPin2 =3;
const int enablePin =9;
const int directionSwitchPin =4;
const int onOffSwitchStateSwitchPin =5;
const int potPin =A0;
int onOffSwitchState = 0;
int previousOnOffSwitchState =0;
int directionSwitchState =0;
int previousDirectionSwitchState =0;
int motorEnabled =0;
int motorSpeed =0;
int motorDirection =1;
void setup() {
  pinMode(directionSwitchPin, INPUT);
  pinMode(onOffSwitchStateSwitchPin, INPUT);
  pinMode(controlPin1, OUTPUT);
  pinMode(controlPin2, OUTPUT);
  pinMode(enablePin, OUTPUT);
  digitalWrite(enablePin, LOW);}
  
void loop() {
              onOffSwitchState = digitalRead(onOffSwitchStateSwitchPin);
              delay(1);
              directionSwitchState = digitalRead(directionSwitchPin);
              motorSpeed = analogRead(potPin)/4;
              if(onOffSwitchState != previousOnOffSwitchState){
                if(onOffSwitchState == HIGH) {
                  motorEnabled = !motorEnabled;
                }
              }    
              if (directionSwitchState != previousDirectionSwitchState){
                if (directionSwitchState==HIGH){
                motorDirection = !motorDirection;
                }
              }
             if (motorDirection == 1){
               digitalWrite(controlPin1, HIGH);
               digitalWrite(controlPin2, LOW);
             }
             else{
               digitalWrite(controlPin1, LOW);
               digitalWrite(controlPin2, HIGH);
             }
             if (motorEnabled == 1){
               analogWrite(enablePin, motorSpeed);
             }
             else{
               analogWrite(enablePin, 0);
             }
             previousDirectionSwitchState = directionSwitchState;
             previousOnOffSwitchState = onOffSwitchState;
}

Draw a schematic of how you wired the chip and post a photo of it .

(using the "Additional Options" button in the lower left of the screen.)

Post the datasheet for the L293 or a link to it. Identify which Figure shows the wiring you used.

Did it occur to you to start simple with just a sketch that choose a direction and sends a speed and NOTHING ELSE ?!

 motorSpeed = analogRead(potPin)/4;

Why did you do this ? Have you heard of the Map function ?

Have you measured the motor voltage with a meter while running your code ?

Write a simple test sketch that just drives the motor at a speed set by the pot using the Map function and nothing else.
No switches.
No nothing. Just a direction command and a speed command using the Map function.
Take a photo of YOUR circuit and post it . Make sure we can see all the wire connections.

There's nothing wrong with your code. I tested it with my hardware.
Your problem is 100% hardware or operator error (miswire). You said your motor was a 12V battery but your not running it on 12V.

sorry first one was a mistake

Take a photo of your circuit and post it. Your code is fine. I tested it. Your schematic shows ENable-2 is pin-8 which is NOT a PWM pin. Your code shows ENable-2 is pin-9 which is CORRECT. You should NOT have a wire connected to arduino pin-8. Post a photo of your circuit. Your motor voltage is probably too low because there is a 2 V drop across the chip. Check your wiring. If you connect a led with a 220 ohm resister to ground and for all three control signals from arduino yiu can see everything happening. I'm running TWO motors and I have SIX LEDS , 4 for DIR & 2 for PWM. I can see EVERYTHING happening. Check your motor voltage . Post a photo of your circuit. I think it would have been easier for you to draw the schematic on a piece of printer paper with a ruler and take a photo of it but if you prefer Fritzing then that's your choice. I like the freedom of a hand drawn schematic because you can do anything you want.

Hi Guys i was able to make it work now there is one thing i want to ask.because i am using separate power to arduino uno and the 12v motor..is there a way to power them using only one source of power...

And because of a little knowledge on arduino and electronics i also purchased an cytron motor driver shield md10.. can this replace the l293d h-bridge circuit.. or this is useless for what i want??

basically i only need to control the direction and speed of my DC motor..

Cytron.io - Simplifying Digital Making

According to this page, the 5V must come from the arduino board.
The power supply connector on the cytron is only for motor power.

You must have a power source plugged into the external dc pwr barrel jack of the arduino. You could get a terminal block and use that as a splitter to split the 12V battery power to the motor shield and the arduino external dc pwr barrel jack

BTW- Did you see my last post ?