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.

Files at this revision

API Documentation at this revision

Comitter:
Davidroid
Date:
Mon Mar 13 17:53:12 2017 +0000
Parent:
25:e8366ca9e8f4
Commit message:
Updated with the new version of the library.

Changed in this revision

X_NUCLEO_IHM02A1.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
diff -r e8366ca9e8f4 -r caec5f51abe8 X_NUCLEO_IHM02A1.lib
--- a/X_NUCLEO_IHM02A1.lib	Fri Mar 10 15:25:22 2017 +0000
+++ b/X_NUCLEO_IHM02A1.lib	Mon Mar 13 17:53:12 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM02A1/#cf489f2ab072
+https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM02A1/#ff67801d7cd7
diff -r e8366ca9e8f4 -r caec5f51abe8 main.cpp
--- a/main.cpp	Fri Mar 10 15:25:22 2017 +0000
+++ b/main.cpp	Mon Mar 13 17:53:12 2017 +0000
@@ -46,7 +46,7 @@
 #include "DevSPI.h"
 
 /* Expansion Board specific header files. */
-#include "XNucleoIhm02a1.h"
+#include "XNucleoIHM02A1.h"
 
 
 /* Definitions ---------------------------------------------------------------*/
@@ -67,7 +67,7 @@
 /* Variables -----------------------------------------------------------------*/
 
 /* Motor Control Expansion Board. */
-XNucleoIhm02a1 *x_nucleo_ihm02a1;
+XNucleoIHM02A1 *x_nucleo_ihm02a1;
 
 /* Initialization parameters of the motors connected to the expansion board. */
 L6470_init_t init[L6470DAISYCHAINSIZE] = {
@@ -143,7 +143,7 @@
 #endif
 
     /* Initializing Motor Control Expansion Board. */
-    x_nucleo_ihm02a1 = new XNucleoIhm02a1(&init[0], &init[1], A4, A5, D4, A2, &dev_spi);
+    x_nucleo_ihm02a1 = new XNucleoIHM02A1(&init[0], &init[1], A4, A5, D4, A2, &dev_spi);
 
     /* Building a list of motor control components. */
     L6470 **motors = x_nucleo_ihm02a1->get_components();