28byj-48 + a4988
- Войдите на сайт для отправки комментариев
Пт, 22/04/2016 - 14:05
Добрый день, возникла следующая проблема :
Купил в магазина двигатель 28byj-48 и драйвер a4988, не разобравшись в теме
В итоге, оказалось, что a4988 работает только с биполярными, нашел тему: http://arduino-diy.com/arduino-deshevyy-3D-printer , перерезал проводок, накидал программку, подключил, двигатель жужжит но не двигается
вот код:
// defines pins numbers const int stepPin = 13; const int dirPin = 12; void setup() { // Sets the two pins as Outputs pinMode(stepPin,OUTPUT); pinMode(dirPin,OUTPUT); } 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 < 200; x++) { digitalWrite(stepPin,HIGH); delayMicroseconds(500); digitalWrite(stepPin,LOW); delayMicroseconds(500); } 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(500); digitalWrite(stepPin,LOW); delayMicroseconds(500); } delay(1000); }
подозреваю что неправильно подключил проводки.
В каком порядке их подключать в A4988?