This is a demo code for stepper motor
Dependencies: StepperMotorUni mbed
main.cpp
00001 // "Hello" program for StepperMotorUni class library 00002 00003 00004 #include "mbed.h" 00005 #include "StepperMotorUni.h" 00006 00007 StepperMotorUni motor( PTB0, PTB1, PTB2, PTB3); 00008 int i; 00009 00010 int main() 00011 { motor.set_pps( 200 ); 00012 for ( i = 200; i<1000; i=i+100) 00013 { 00014 motor.move_steps(i); 00015 wait( 5 ); 00016 00017 } 00018 }
Generated on Tue Jul 12 2022 16:18:38 by
1.7.2