L298n Hbridge + Potentiometer Connections

Hi can someone help me to identify where certain leads go between the H bridge and the arduino...

and where the petentiometer should be positioned...

i am controlling a single DC motor.

The ouputs i have on my H bridge are:

i assume these go to the arduino:
-enable
-in1
-in2

These to the motor:
-output 1
-output 2

these for power:
-Vs - motor operating voltage
-0V - ground
-5v - to power the hbridge

is this correct?
does anyone have any code i can use?

below is a copy of the schematic i am using. i currently do not have any code.

![](http://C:\Users\Am\Desktop\Arduino Project\hbridge3.jpg)
![](http://C:\Users\Am\Desktop\Arduino Project\hbridge2.jpg)
![](http://C:\Users\Am\Desktop\Arduino Project\hbridge1.jpg)

sorry here is the schematic

detailed LHS

detailed rhs

Why is the RX +5V supply connected to Arduino pin 10? A mistake?

No its not a mistake, when you set pin 10 , or any pin, HIGH it is the same as giving out 5volts, so basically its the same as the 5v pin, and as you can see it was already being used to power the h-bridge so i just used a different pin to power the rx, i could of shared it with the 5v pin that was powering the h-bridge but a full 5v means longer range