I have a Arduino MEGA 2560 bought and a stepper motor that drives on 12 V and 0.6 A (200 steps per rotation). I power it with a DRV8825 motor driver. I only don't know how to pragram this. I do know how to wire the stepper motor driver.
I want that the stepper motor turns 6 rotations and then stops rotating but it needs to keep his power.
I searched a lot online but I didn't find something that can help me. So I hope someone can help me with this?
What did you try? Give us a link to your motor (bipolar stepper motor?)
The first google hit for your driver is this library did you study that code and associated examples?
Have you read this in details? And read tutorials on steppers and motors?
You need to do your homework...
The Pololu DRV8825 web page has great information including a wiring diagram.
These links may help
Stepper Motor Basics
Simple Stepper Code
And for the timing of things have a look at how millis() is used to manage timing in Several things at a time.