I see, thanks for the replies. Now my mind is more clear about these stuffs.
Right now Im trying several input sequenses, but there are so many combinations with ones and zeroes. Do you have any clue what I should input to make it move forward?
edit:
I managed to make it work, but only with halfstep. How do you make it fullstep?
Here are the values to make it go 1 step (but it goes pretty slow…)
There are like thousend of different sequenses but none of em works.
B2B1A2A1 STEP
0111 1
0110 2
1110 3
1010 4
1011 5
1001 6
1101 7
0101 8
Cheers
Second Edit:
Well now I successfully got it to work with full step.
Id like to share the code, and have some thoughts of how I could make it faster, I dont think I can speed this up anymore without letting the stepper motor have the same cords all the time.
What Im trying to do is a frameless harp.
Here is a prototype just to make the rotating.
int motorPin1 =8;
int motorPin2 =9;
int motorPin3 =10;
int motorPin4 =11;
int motorDelay = 3;
void setup() {
Serial.begin(9600);
}
void loop() {
for(int StepX = 8 ; StepX > 0; StepX--){
step_backward(1);
delay(3);
}
for(int StepX = 0 ; StepX < 8; StepX++){
step_forward(1);
delay(3);
}
}
int step_forward(int y){
for(int x = 0 ; x < 1 ; x++){
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(motorDelay);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(motorDelay);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(motorDelay);
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(motorDelay);
}
}
int step_backward(int y){
for(int x = 0 ; x < 1 ; x++){
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(motorDelay);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(motorDelay);
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(motorDelay);
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(motorDelay);
}
}