Better driving method; calibration routine
Dependencies: Stepper_Motor_X27168 mbed
Fork of ECE_4180_Lab_4 by
main.cpp
- Committer:
- yhbyhb4433
- Date:
- 2016-03-16
- Revision:
- 1:5de876de6423
- Parent:
- 0:71dc3ae7e2eb
File content as of revision 1:5de876de6423:
#include "mbed.h" #include "StepperMotor_X27168.h" StepperMotor_X27168 smotor(p25, p26, p23, p22); int main() { smotor.init(); //initialize the motor smotor.set_speed(500); //set the speed to 500 steps per second smotor.angle_position(45); wait(1); smotor.angle_position(270); wait(1); smotor.angle_position(90); wait(1); smotor.angle_position(180); wait(1); smotor.angle_position(315); wait(1); smotor.angle_position(45); wait(1); smotor.angle_position(0); wait(1); }