Maybe your speed problem would be solved if you used a PWM pin for the output.

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.Do not send technical questions via personal messaging - they will be ignored.I speak for myself, not Arduino.

analogWrite() commands only work on arduino pins that support PWM because internal timer support is needed and they are only 'hardwired' to specify arudino pin numbers, depending on what processor chip your board uses (Mega board has more timers then Uno board). The arduino reference page for analogWrite command tells which output pins will support PWM: http://arduino.cc/en/Reference/AnalogWrite

Quote

What is diode correct place? Have you a detailed example for a beginner?

Look at the below linked drawing of controlling a solenoid and see where the diode is wired and which direction the diode is to be wired, it's the same for a simple single winding DC motor: http://arduino.cc/playground/uploads/Learning/solenoid_driver.pdf

analogWrite(3, 0); // Pin 3 is off all the timeanalogWrite(3, 64); // Pin 3 is on 1/4 of the time and off 3/4 of the time.analogWrite(3, 128); // Pin 3 is on half the time and off half the time.analogWrite(3, 192); // Pin 3 is on 3/4 of the time and off 1/4 of the time.analogWrite(3, 255); // Pin 3 is on all the time

The pulses are quite fast so for LED's and motors it acts like an analog signal.

If you use a pin that can't do PWM you get LOW for all values below 128 and HIGH for all values above 127. That is why your motor on Pin 2 is doing just OFF (LOW) and ON (HIGH).

Hi!I have arduino UNO and Bridge H L298Conect your DC Motor to Bridge H and conect in1 to PIN11 Arduino.Then, PIN1 of the potenciometer to 5v, PIN2 to A0 and PIN3 to GND and here the programmingGood Luck! (Sorry my english, I'm from Argentina)NOTE: YOU MUST CONECT THE GND ARDUINO TO GND BRIDGE H!