For Hamza

Dependencies:   StepperMotorUni StepperMotorUni_Hello mbed

Fork of StepperMotorUni_Hello by Tedd OKANO

main.cpp

Committer:
okano
Date:
2015-04-22
Revision:
1:80c512ccd0f2
Parent:
0:ae2206213141
Child:
2:21d312d28d45

File content as of revision 1:80c512ccd0f2:

/** "Hello" program for StepperMotorUni class library
 *
 *  very simple sample of "StepperMotorUni" operation 
 * 
 *  version 1.0
 *  copyright: 2014 Tedd OKANO
 *  released under the Apache 2 license License
 */

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

StepperMotorUni motor( p26, p25, p24, p23 );

int main()
{
    motor.set_operation_phase_mode( StepperMotorUni::HALFSTEP );
    motor.set_pps( 200 );

    while ( 1 ) {
        motor.move_steps( 48 );
        wait( 1 );

        motor.move_steps( -48 );
        wait( 1 );
    }
}