Using a Potentiometer to accelerate a motor connected to the L293D and change the direction by pressing a button.

The Fritzing sketch should be fairly self-explanatory :)

The condensator is not nessary but good for avoiding the "Bürstenfeuer". Do not know how to call it in english.