1

Dependencies:   X-NUCLEO-IHM05A1

Example code to use L6208 stepper motor driver with nucleo evaluation shield

Explanation: Run a test to determine the maximum speed of the motor at given current and acceleration Run the motor in position mode with microstepping and slow decay

Files at this revision

API Documentation at this revision

Comitter:
gidiana
Date:
Wed May 29 09:27:21 2019 +0000
Parent:
16:1dc772fba09f
Commit message:
ale

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 1dc772fba09f -r 33c94534a440 main.cpp
--- a/main.cpp	Fri Dec 07 17:40:15 2018 +0000
+++ b/main.cpp	Wed May 29 09:27:21 2019 +0000
@@ -92,7 +92,7 @@
  //motor->set_max_speed(2000);
  //motor->set_acceleration(2400);
  //motor->set_deceleration(2400);
- motor->set_max_speed(motor->get_max_speed()<<2);
+  motor->set_max_speed(motor->get_max_speed()<<2);
   motor->set_acceleration(motor->get_acceleration()<<2);
   motor->set_deceleration(motor->get_deceleration()<<2);
   printf(" init\n\r");
@@ -133,8 +133,6 @@
   
    }
 }
- 
-  
     /* Waiting while the motor is active. */
     motor->wait_while_active();