Anonymous User
Problema con i driver A4899 March 25, 2017 12:40PM |
#define STEP 3 #define DIR 4 void setup() { pinMode(STEP, OUTPUT); pinMode(DIR, OUTPUT); } void loop() { digitalWrite(DIR, HIGH); for(int i = 0; i < 10; i++) { digitalWrite(STEP, HIGH); delayMicroseconds(250); digitalWrite(STEP, LOW); delayMicroseconds(250); } delay(100); digitalWrite(DIR, LOW); }
Re: Problema con i driver A4899 March 26, 2017 08:46AM |
Registered: 8 years ago Posts: 146 |
Quote
perciò ho investigato un po' con il multimeter e ho notato che il pin ENABLE sul socket del driver è connesso ai 5V sull'Arduino
Re: Problema con i driver A4899 March 26, 2017 09:01AM |
Registered: 8 years ago Posts: 146 |
#define STEP 3 #define DIR 4 #define ENABLE 5 // <------ void setup() { pinMode(STEP, OUTPUT); pinMode(DIR, OUTPUT); pinMode(ENABLE, OUTPUT); // <-------- digitalWrite(ENABLE, LOW) // <--------- } void loop() { digitalWrite(DIR, HIGH); for(int i = 0; i < 10; i++) { digitalWrite(STEP, HIGH); delayMicroseconds(250); digitalWrite(STEP, LOW); delayMicroseconds(250); } delay(100); digitalWrite(DIR, LOW); }