DRV8825 motor driver help

Hello all,
I am currently using the DRV8825 motor driver to control my 1.7A stepper motor. I am a very beginner with all of this but found some code on the internet that I was able to work into mine and make my motor work as I would like (just turn and back forward a few times) but everything I found had poor comments so I am not sure what everything does. Anyways when I run the code the driver gets very hot in just seconds. From what I understand I have 2 options, use a heatsink or change the microstepping. Precision is not very important and was hoping someone could help explain how to mess around with the amount of microstepping or if anyone had any other advice.

Thank you all for your help!

[code]#define Direction 13 //Direction Pin - Initial State is ZERO
#define Step 12 //Step Pin - Pulse this to step the motor in the direction selected by the Direction Pin
#define StepsPerRev 600 //How many steps our motor needs to do a full rotation
int DirectionToggle = 0; //Just a Toggle for the Direction Flag
void setup()
{
pinMode(Direction, OUTPUT);
pinMode(Step, OUTPUT);

Serial.begin(9600); // NOT needed - But lets us see feedback to see if the Code is running
}
void loop()
{
digitalWrite(Direction,DirectionToggle);
delay(250);
for (int loopy=0; loopy<4000;loopy++)
{
digitalWrite(Step,HIGH);
delay(1);
digitalWrite(Step,LOW);
delay(1);
}
DirectionToggle=!DirectionToggle;
Serial.print(F("Loop1 - Dir Flag : "));// NOT needed - But lets us see feedback to see if the Code is running
Serial.println(DirectionToggle); // NOT needed - But lets us see feedback to see if the Code is running

}
[/code]

Heres some of the code I have been using as a resource if that helps.

Hello.

It is normal for the DRV8825 to get hot when delivering current to your stepper motor. Even when the motor is stationary the coils are energized and drawing current. What is the current limit of your DRV8825 set to?

- Amanda