Motion control example for 1 motor.
Dependencies: X_NUCLEO_IHM03A1 mbed
Fork of IHM03A1_ExampleFor1Motor by
This application provides an example of usage of the X-NUCLEO-IHM03A1 High Power Stepper Motor Control Expansion Board.
It shows how to use one stepper motor connected to the board by:
- moving the rotor a specific number of steps or to a specific position, with a given speed value, direction of rotation;
- monitoring the motor status;
- handling an interrupt triggered by the motor driver;
- getting and setting a motor driver parameter.
- etc.
For the hardware configuration of the expansion board, please refer to the X_NUCLEO_IHM03A1 home web page.
Revision 3:465d357bbce3, committed 2016-04-13
- Comitter:
- nucleosam
- Date:
- Wed Apr 13 09:01:05 2016 +0000
- Parent:
- 2:7e8485b5d57d
- Child:
- 4:5b4969cb5bf0
- Commit message:
- Added printf in the "myFlagIRQHandler" function.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Apr 13 08:53:45 2016 +0000
+++ b/main.cpp Wed Apr 13 09:01:05 2016 +0000
@@ -123,6 +123,7 @@
/* Get the value of the status register. */
unsigned int statusRegister = motor->GetStatus();
+ printf(" WARNING: \"FLAG\" interrupt triggered.\r\n");
/* Check HIZ flag: if set, power brigdes are disabled */
if ((statusRegister & POWERSTEP01_STATUS_HIZ)==POWERSTEP01_STATUS_HIZ)
{
