Simple test application for the STMicroelectronics X-NUCLEO-IHM01A1 Stepper Motor Control Expansion Board, built against mbed OS.

Dependencies:   X_NUCLEO_IHM01A1

Fork of HelloWorld_IHM01A1_2Motors by ST

Motor Control with the X-NUCLEO-IHM01A1 Expansion Board

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

Files at this revision

API Documentation at this revision

Comitter:
Davidroid
Date:
Wed Jan 13 15:12:12 2016 +0000
Parent:
15:50c6f8635dfd
Child:
17:aae1446c67f4
Commit message:
+ Updated with the new version of the library.; + Order of initialization instructions corrected.

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	Mon Jan 04 16:02:39 2016 +0000
+++ b/X_NUCLEO_IHM01A1.lib	Wed Jan 13 15:12:12 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM01A1/#35b9ca8c4bd6
+https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM01A1/#5f0b00a1e38d
--- a/main.cpp	Mon Jan 04 16:02:39 2016 +0000
+++ b/main.cpp	Wed Jan 13 15:12:12 2016 +0000
@@ -73,9 +73,9 @@
 
     /* Initializing Motor Control Components. */
     motor1 = new L6474(D2, D8, D7, D9, D10, dev_spi);
+    motor2 = new L6474(D2, D8, D4, D3, D10, dev_spi);
     if (motor1->Init() != COMPONENT_OK)
         exit(EXIT_FAILURE);
-    motor2 = new L6474(D2, D8, D4, D3, D10, dev_spi);
     if (motor2->Init() != COMPONENT_OK)
         exit(EXIT_FAILURE);