Simple test application for the STMicroelectronics X-NUCLEO-IHM02A1 Stepper Motor Control Expansion Board.

Dependencies:   X_NUCLEO_IHM02A1 mbed

Fork of HelloWorld_IHM02A1 by ST Expansion SW Team

Motor Control with the X-NUCLEO-IHM02A1 Expansion Board

This application provides a simple example of usage of the X-NUCLEO-IHM02A1 Stepper Motor Control Expansion Board.
It shows how to use two stepper motors connected in daisy chain configuration to the board, moving the rotors to specific positions, with given speed values, direction of rotations, etc.

Revision:
11:79fcaf38c09d
Parent:
9:f35fbeedb8f4
Child:
12:5be6dd48b94a
diff -r d1e568b0079d -r 79fcaf38c09d main.cpp
--- a/main.cpp	Mon Jan 04 16:11:47 2016 +0000
+++ b/main.cpp	Thu Jan 14 10:01:18 2016 +0000
@@ -70,12 +70,12 @@
 X_NUCLEO_IHM02A1 *x_nucleo_ihm02a1;
 
 /* Initialization parameters of the motors connected to the expansion board. */
-MICROSTEPPING_MOTOR_InitTypeDef init[L6470DAISYCHAINSIZE] =
+L6470_InitTypeDef init[L6470DAISYCHAINSIZE] =
 {
     /* First Motor. */
     {
         9.0,                /* Motor supply voltage in V. */
-        200,                /* Min number of steps per revolution for the motor. */
+        400,                /* Min number of steps per revolution for the motor. */
         1.7,                /* Max motor phase voltage in A. */
         3.06,               /* Max motor phase voltage in V. */
         300.0,              /* Motor initial speed [step/s]. */
@@ -103,7 +103,7 @@
     /* Second Motor. */
     {
         9.0,                /* Motor supply voltage in V. */
-        200,                /* Min number of steps per revolution for the motor. */
+        400,                /* Min number of steps per revolution for the motor. */
         1.7,                /* Max motor phase voltage in A. */
         3.06,               /* Max motor phase voltage in V. */
         300.0,              /* Motor initial speed [step/s]. */