ECE 4180 Lab 2 Part 11

Dependencies:   Stepper_Motor_X27168 mbed

Fork of ECE_4180_Lab_4 by Stepper Motor

main.cpp

Committer:
abraha2d
Date:
2018-10-09
Revision:
1:d36b1970cb2f
Parent:
0:71dc3ae7e2eb

File content as of revision 1:d36b1970cb2f:

#include "mbed.h"
#include "StepperMotor_X27168.h"

StepperMotor_X27168 smotor(p23, p22, p24, p25);

int main()
{
    while (1) {
        smotor.step_position(180);
        wait(0.5);

        smotor.step_position(100);
        wait(0.5);

        smotor.angle_position(270);
        wait(0.5);

        smotor.step_position(0);
        wait(0.5);
    }
}