Добрый день CNC гуру.Подскажите подключил Шаговик nema 23 к драйверу 2dm556 и управляю ардуино нано. Поставил перемычки на ток 4А и микрошаг 400 -В итоге двигатель не движется но и не вращается. ПОдскажите это драйверу кабздец или что то не так в коде ? Хотя он до безумия прост :// defines pins numbers
const int stepPin = 9;
const int dirPin = 8;
const int enPin = 6;
void setup() {
// Sets the two pins as Outputs
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
pinMode(enPin,OUTPUT);
digitalWrite(enPin,LOW);
Serial.begin(9600);
}
void loop() {
digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
// Makes 200 pulses for making one full cycle rotation
for(int x = 0; x < 400; x++) {
digitalWrite(stepPin,HIGH);
delayMicroseconds(200);
digitalWrite(stepPin,LOW);
delayMicroseconds(200);
Serial.println("Forward");
delay (50);
}
delay(1000); // One second delay
digitalWrite(dirPin,LOW); //Changes the rotations direction
// Makes 400 pulses for making two full cycle rotation
for(int x = 0; x < 400; x++) {
digitalWrite(stepPin,HIGH);
delayMicroseconds(200);
digitalWrite(stepPin,LOW);
delayMicroseconds(200);
Serial.println("Backword");
delay (50);
}
delay(1000);
}
