noob q

how do i make this work ??

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1251509480

cheers
skip

Just stick them in the same folder as your .pde sketch...

Mowcius

Thanks m8
But i am still having a hard time with it lol

Could somebody plz plz plz write me a small peace of code
useing the EasyDriver.h ???

just make the stepper move 1000 steps or so.

just so i can see how to use it.

as this has bin doing my head in for hours/days : :cry:

thanks guys

skip

Why don't you show us what your code looks like, then we can maybe poit you in the right direction?

what am i doing wrong guys ??

#include <easydriver.h>




int dir_pin = 3;
int step_pin = 12;
int (steps);
int (dirpin);
int (steppin);
Stepper stepper = Stepper(steps,dirpin,steppin);

void setup() 
{
Serial.begin(9600);

}


void loop()
{
 int val = 2000;

Stepper.step=(val);
delay (1000);
Stepper.step=(-val);
}

what am i doing wrong guys ??

int (steps);
int (dirpin);
int (steppin);

You should not have round brackets in these declarations:

int steps;
int dirpin;
int steppin;

You will also need to write a "loop" function:

void loop ()
{
...
}

You must tell us a bit more about what you want to do in the main part of the sketch, and that code will replace the "..." above.

Also:-

Stepper.step=(val);
delay (1000);
Stepper.step=(-val);

should be:-

Stepper.step=(val);
delay (1000);
Stepper.step=(-val);
delay (1000);

Otherwise you go right round the loop with no delay.

Sorry guys, but y'all missed it:

int dir_pin = 3;
int step_pin = 12;
int (steps);
int (dirpin);
int (steppin);
Stepper stepper = Stepper(steps,dirpin,steppin);

You are calling your constructor method with un-initialized variables.

This should read something like this:

int dir_pin = 3;
int step_pin = 12;
int steps = ##  // put a number here. It will depend on your particular motor.
Stepper stepper = Stepper(steps, dir_pin, step_pin);

What you were doing is assigning a value to "dir_pin" and "step_pin", but then calling the constructor with "dirpin" and "steppin". These are different variable names which never had values assigned to them. Likewise, you never assigned a value to "steps" before the constructor.