example

i have been looking for stepper motor examples but they are few and hard to find

the one you have in your install dose not work for this controler at

i did find this example it was not even ment for the board i am using but it dose work for it.

int dirPin = 2;
int stepperPin = 3;

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(1000);
digitalWrite(stepperPin, LOW);
delayMicroseconds(1000);
}
}

void loop(){
step(true,1600);
delay(500);
step(false,1600*5);
delay(500);
}

i would like to see this added if the Aurthur would like it to be, but i would like to see something like it added though

i have posted a link to were i found the code thanks to sparkfun for that.

http://lusorobotica.com/index.php/topic,106.0.html this is where i found the code posted above

i tried to put it in but it would not allow that on my first post. :cry:

i can understand why thats not a bad idea though. :slight_smile: