ECE 4180 Lab 2 Part 11

Dependencies:   Stepper_Motor_X27168 mbed

Fork of ECE_4180_Lab_4 by Stepper Motor

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "StepperMotor_X27168.h"
00003 
00004 StepperMotor_X27168 smotor(p23, p22, p24, p25);
00005 
00006 int main()
00007 {
00008     while (1) {
00009         smotor.step_position(180);
00010         wait(0.5);
00011 
00012         smotor.step_position(100);
00013         wait(0.5);
00014 
00015         smotor.angle_position(270);
00016         wait(0.5);
00017 
00018         smotor.step_position(0);
00019         wait(0.5);
00020     }
00021 }