Test application for the STMicroelectronics X-NUCLEO-IHM01A1 Stepper Motor Control Expansion Board.

Dependencies:   X_NUCLEO_IHM01A1

Fork of MotorControl_IHM01A1 by ST

Motor Control with the X-NUCLEO-IHM01A1 Expansion Board

This application provides a more complex example of usage of the X-NUCLEO-IHM01A1 Stepper Motor Control Expansion Board.
It shows how to use one stepper motor connected to the board, with an example of ISR and error handler, as well as an almost complete coverage of the available APIs, e.g.:

  • moving the rotor to a specific position;
  • moving the rotor for a certain amount of time;
  • setting the speed value;
  • setting the direction of rotation;
  • changing the stepper motor mode;
  • soft/hard stopping the rotor;
  • powering off the power bridge.

Files at this revision

API Documentation at this revision

Comitter:
Davidroid
Date:
Fri Nov 27 12:47:16 2015 +0000
Parent:
6:ff72e3344fb1
Child:
8:02a7ce0e986e
Commit message:
+ Updated with the new version of the library.

Changed in this revision

X_NUCLEO_IHM01A1.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/X_NUCLEO_IHM01A1.lib	Thu Nov 26 16:15:13 2015 +0000
+++ b/X_NUCLEO_IHM01A1.lib	Fri Nov 27 12:47:16 2015 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST-Expansion-SW-Team/code/X_NUCLEO_IHM01A1/#c3824af0caf4
+https://developer.mbed.org/teams/ST-Expansion-SW-Team/code/X_NUCLEO_IHM01A1/#9f4b9540ff3e
--- a/main.cpp	Thu Nov 26 16:15:13 2015 +0000
+++ b/main.cpp	Fri Nov 27 12:47:16 2015 +0000
@@ -146,6 +146,9 @@
     if (motor->Init(NULL) != COMPONENT_OK)
         return false;
 
+    /* Setting 1/16 Microstepping mode. */
+    motor->SetStepMode(STEP_MODE_1_16);
+
     /* Printing to the console. */
     printf("Motor Control Application Example for 1 Motor\r\n\n");