user7642: I want to Use LEONARDO PRO MICRO and A4988 Stepper Motor DRIVER to control Nema 17 Stepper Motor.


Please let me know how to hookup these together. 
Please give me a circuit for this type of assembly with Arduino code.

user4887: You can simply make a google search;

Here is some code to get you started
// Declaration of variables
#define Step 7     // Pin that transmits the "step" order to the board
#define Dir  6     // Pin that indicates the direction of the rotation
int vit  =   10 ;   // Speed of the rotation (smaller means faster rotation)
int sens =   1  ;  // Rotation direction (0 or 1)


void setup()
{
  pinMode( Step  , OUTPUT );
  pinMode( Dir   , OUTPUT );
}
void loop()
{
    digitalWrite( Dir   , sens);
    digitalWrite( Step  , LOW);
    // Fabrication d'un "Pas"
    digitalWrite( Step, HIGH );
    delay(vit);
    digitalWrite( Step, LOW );
    delay(vit);
}

Just a google search and I got on [this site][2] which had the code I gave you.
I think you can also find some libraries that can do the work for you.
in case that you need to wait less than a millisecond, millis() won't be useful for you; instead, use delayMicroseconds() which will make you wait a thousandth (at minimum) of a millisecond.
EDIT
For what you asked you have to first get the voltage: 
float voltage = analogRead ( 0 )  * (3.0 / 1023.0);

You just have to adapt your speed relatively to the voltage.
To do this, I suggest you the map function directly from Arduino site.
Be careful just because whatever you are doing, analogRead takes 100 microseconds to get the voltage, so if you need to go very fast you can't.  I suggest you to work with a different type of communication, like Serial, SPI or I2c. 

7642: <p>I want to Use LEONARDO PRO MICRO and A4988 Stepper Motor DRIVER to control Nema 17 Stepper Motor.</p>

<p><img src="https://i.stack.imgur.com/43w75.jpg" alt="enter image description here">
<img src="https://i.stack.imgur.com/pklWd.png" alt="enter image description here"></p>

<p>Please let me know how to hookup these together. </p>

<p>Please give me a circuit for this type of assembly with Arduino code.</p>
 4887: <p>You can simply make a google search;
<img src="https://i.stack.imgur.com/7W4Th.png" alt="Wiring instructions"></p>

<p>Here is some code to get you started</p>

<pre><code>// Declaration of variables
#define Step 7     // Pin that transmits the "step" order to the board
#define Dir  6     // Pin that indicates the direction of the rotation
int vit  =   10 ;   // Speed of the rotation (smaller means faster rotation)
int sens =   1  ;  // Rotation direction (0 or 1)


void setup()
{
  pinMode( Step  , OUTPUT );
  pinMode( Dir   , OUTPUT );
}
void loop()
{
    digitalWrite( Dir   , sens);
    digitalWrite( Step  , LOW);
    // Fabrication d'un "Pas"
    digitalWrite( Step, HIGH );
    delay(vit);
    digitalWrite( Step, LOW );
    delay(vit);
}
</code></pre>

<p>Just a google search and I got on [this site][2] which had the code I gave you.
I think you can also find some libraries that can do the work for you.</p>

<p>in case that you need to wait less than a millisecond, <code>millis()</code> won't be useful for you; instead, use <code>delayMicroseconds()</code> which will make you wait a thousandth (at minimum) of a millisecond.</p>

<p><strong>EDIT</strong></p>

<p>For what you asked you have to first get the voltage: </p>

<pre><code>float voltage = analogRead ( 0 )  * (3.0 / 1023.0);
</code></pre>

<p>You just have to adapt your speed relatively to the voltage.
To do this, I suggest you the <a href="http://arduino.cc/en/reference/map" rel="nofollow noreferrer">map function</a> directly from Arduino site.</p>

<p>Be careful just because whatever you are doing, analogRead takes <strong>100 microseconds</strong> to get the voltage, so if you need to go very fast you can't.  I suggest you to work with a different type of communication, like Serial, SPI or I2c. </p>
