This is a demo code for stepper motor

Dependencies:   StepperMotorUni mbed

main.cpp

Committer:
EduRemo
Date:
2016-02-05
Revision:
0:85fecbeec987

File content as of revision 0:85fecbeec987:

// "Hello" program for StepperMotorUni class library
 

#include "mbed.h"
#include "StepperMotorUni.h"

StepperMotorUni motor( PTB0, PTB1, PTB2, PTB3);
int i;

int main()
{   motor.set_pps( 200 );
    for ( i = 200; i<1000; i=i+100) 
    {
        motor.move_steps(i);
        wait( 5 );

    }
}