Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_IHM01A1
Fork of HelloWorld_IHM01A1_2Motors by
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.
Diff: main.cpp
- Revision:
- 5:a0268a435bb1
- Parent:
- 3:02d9ec4f88b2
- Child:
- 6:10bf302cd369
diff -r 3331bcf7b08e -r a0268a435bb1 main.cpp
--- a/main.cpp Thu Nov 19 14:12:30 2015 +0000
+++ b/main.cpp Fri Nov 20 18:03:43 2015 +0000
@@ -72,10 +72,10 @@
DevSPI dev_spi(D11, D12, D13);
/* Initializing Motor Control Component. */
- motor1 = new L6474(D8, D7, D9, D10, dev_spi);
+ motor1 = new L6474(D2, D8, D7, D9, D10, dev_spi);
if (motor1->Init(NULL) != COMPONENT_OK)
return false;
- motor2 = new L6474(D8, D4, D3, D10, dev_spi);
+ motor2 = new L6474(D2, D8, D4, D3, D10, dev_spi);
if (motor2->Init(NULL) != COMPONENT_OK)
return false;
