int dirPin = 8;
int stepperPin = 7;
void setup() {
pinMode(dirPin, OUTPUT);
pinMode(stepperPin, OUTPUT);
}
void step(boolean dir,int steps){
digitalWrite(dirPin,dir);
delay(50);
for(int i=0;i<steps;i++){
digitalWrite(stepperPin, HIGH);
delayMicroseconds(800);
digitalWrite(stepperPin, LOW);
delayMicroseconds(800); }
}
void loop(){
step(true,1600);
delay(500);
step(false,1600*5);
delay(500); }
Clone X-Axis to the 4th stepper driver(Marked as A)
Use D12 and D13 to drive the 4th stepper driver(Marked as A)
End Stop Configuration
By default GRBL is configured to trigger an alert if an end-stop goes low(Gets grounded).
On the forums this has been much debated and some people requested to have active
High end-stops. The jumpers in the picture provides the option to do both. (To run with
default setting on GRBL the jumper need to be connected like the left shield in the image
below)(This Jumper was only introduced in Version 3.02)
active low -> 左圖...
active high -> 右圖
沒有留言:
張貼留言