user20091: I'm trying to make a nema17 stepper motor work using ramps1.4 and A4988 driver.
But when I'm trying to rotate motor, it spins with almost no torque and constant shaking.

Motor 2-phase nema17 , Step Angle 1.8° .
Power supply 12v/60w.

Here is the sketch:
(I copied it from RepRap wiki , and removed everything except X Motor)
#define X_STEP_PIN         54
#define X_DIR_PIN          55
#define X_ENABLE_PIN       38

void setup() 
{
  pinMode(X_STEP_PIN       , OUTPUT);
  pinMode(X_DIR_PIN        , OUTPUT);
  pinMode(X_ENABLE_PIN     , OUTPUT);
  digitalWrite(X_ENABLE_PIN, LOW);
}

void loop () 
{    
  if (millis() % 10000 < 5000) 
  {
    digitalWrite(X_DIR_PIN    , HIGH);
  }
  else
  {
    digitalWrite(X_DIR_PIN    , LOW);
  }

  digitalWrite(X_STEP_PIN     , HIGH);
  delay(1);
  digitalWrite(X_STEP_PIN     , LOW);    
}

The wiring diagram:
(I have only X Motor plugged in)

and video: (Google Video link is dead @ 2017-02-09)

user28569: Add a second delay after:
digitalWrite(X_STEP_PIN    , LOW);
Also try increasing the delay maybe you are pulsing the step pin too fast.

20091: <p>I'm trying to make a <a href="http://www.omc-stepperonline.com/stepper-motors-nema-17-stepper-motors-c-1_21.html" rel="nofollow noreferrer">nema17 stepper motor</a> work using ramps1.4 and <a href="http://www.allegromicro.com/en/Products/Motor-Driver-And-Interface-ICs/Bipolar-Stepper-Motor-Drivers/A4988.aspx" rel="nofollow noreferrer">A4988 driver</a>.<br>
But when I'm trying to rotate motor, it spins with almost no torque and constant shaking.</p>

<ul>
<li>Motor 2-phase nema17 , Step Angle 1.8° .</li>
<li>Power supply 12v/60w.</li>
</ul>

<p>Here is the sketch:<br>
(I copied it from RepRap wiki , and removed everything except X Motor)</p>

<pre><code>#define X_STEP_PIN         54
#define X_DIR_PIN          55
#define X_ENABLE_PIN       38

void setup() 
{
  pinMode(X_STEP_PIN       , OUTPUT);
  pinMode(X_DIR_PIN        , OUTPUT);
  pinMode(X_ENABLE_PIN     , OUTPUT);
  digitalWrite(X_ENABLE_PIN, LOW);
}

void loop () 
{    
  if (millis() % 10000 &lt; 5000) 
  {
    digitalWrite(X_DIR_PIN    , HIGH);
  }
  else
  {
    digitalWrite(X_DIR_PIN    , LOW);
  }

  digitalWrite(X_STEP_PIN     , HIGH);
  delay(1);
  digitalWrite(X_STEP_PIN     , LOW);    
}
</code></pre>

<p>The wiring diagram:<br>
(I have only X Motor plugged in)</p>

<p><a href="https://i.stack.imgur.com/oyFfD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oyFfD.jpg" alt="enter image description here"></a></p>

<p>and video: (<em>Google Video link is dead @ 2017-02-09</em>)</p>
 28569: <p>Add a second delay after:</p>

<p>digitalWrite(X_STEP_PIN    , LOW);</p>

<p>Also try increasing the delay maybe you are pulsing the step pin too fast.</p>
