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 ST

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:
Thu Mar 09 15:35:35 2017 +0000
Parent:
22:e81ccf73bc5d
Child:
24:d1f487cb02ba
Commit message:
Added support for the Nucleo-F429ZI board.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Mar 01 17:53:04 2017 +0000
+++ b/main.cpp	Thu Mar 09 15:35:35 2017 +0000
@@ -136,7 +136,11 @@
     /*----- Initialization. -----*/
 
     /* Initializing SPI bus. */
+#ifdef TARGET_STM32F429
+    DevSPI dev_spi(D11, D12, D13);
+#else
     DevSPI dev_spi(D11, D12, D3);
+#endif
 
     /* Initializing Motor Control Expansion Board. */
     x_nucleo_ihm02a1 = new X_NUCLEO_IHM02A1(&init[0], &init[1], A4, A5, D4, A2, &dev_spi);
--- a/mbed.bld	Wed Mar 01 17:53:04 2017 +0000
+++ b/mbed.bld	Thu Mar 09 15:35:35 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/87f2f5183dfb
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/e1686b8d5b90
\ No newline at end of file