The problem with the motor driver easydriver

02 Sep 2014

Hi I have a problem with the program. I am a novice programmer. Using the library Matthew Else "Easydriver"

Could someone help me with the program, or indicate a problem?

  1. include "mbed.h"
  2. include "Stepper.h"
  3. include <DigitalOut.h>
  4. include <BusOut.h>

DigitalOut myled(LED1);

int main() { stepper obiekt(PA_0, PA_1, PA_4, PB_0, PC_1, PC_0);

obiekt.step(0,1,0x1440ul); void enable(); while(1) {

myled = 1; wait(0.1); myled = 0; wait(0.2); } }

02 Sep 2014

I'm not sure what you are expecting to see happen with your code, but I would assume you are trying to get the stepper to turn constantly correct?

If the answer is yes, then one problem lies in the fact that your method call to make the stepper move is outside your loop. The other problem that I see is that you are passing in 0 for the number of steps.

03 Sep 2014

hi Everything works as it should, but I have one question. Wonder if you could someone tell me what's going on with the first variable. Thank you for your help.

obiekt.step (1,1,0x600ul);

05 Sep 2014

Everything is working as it should. THX