![](/media/cache/group/ST_logo_2020_blue_V_cmyk.jpg.50x50_q85.jpg)
Simple test application for the STMicroelectronics X-NUCLEO-IHM02A1 Stepper Motor Control Expansion Board, built against mbed OS.
Dependencies: X_NUCLEO_IHM02A1
Fork of HelloWorld_IHM02A1 by
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.
Diff: main.cpp
- Revision:
- 26:caec5f51abe8
- Parent:
- 24:d1f487cb02ba
- Child:
- 27:b25816ce6043
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();