Simple program featuring a few API functions usage of the X_NUCLEO_IHM05A1 library.

Dependencies:   X-NUCLEO-IHM05A1 mbed

Fork of HelloWorld_IHM05A1 by ST Expansion SW Team

This application provides a simple example of usage of the X-NUCLEO-IHM05A1 Bipolar Stepper Motor Control Expansion Board.

It shows how to use a stepper motor connected to the board by:

  • Running the motor;
  • Monitoring the speed and the motor state;
  • Setting/Getting the speed;
  • Setting/Getting the step mode;
  • Setting/Getting the acceleration and deceleration;
  • Moving a defined number of steps or microsteps;
  • Setting/Getting the direction;
  • Setting/Getting the decay mode.

For the hardware configuration of the expansion board, please refer to the X_NUCLEO_IHM05A1 library web page.

Files at this revision

API Documentation at this revision

Comitter:
Davidroid
Date:
Fri Jul 28 13:07:13 2017 +0000
Parent:
7:27124344c5e5
Commit message:
Updating with new libraries.

Changed in this revision

X-NUCLEO-IHM05A1.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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 27124344c5e5 -r baedd289a8cc X-NUCLEO-IHM05A1.lib
--- a/X-NUCLEO-IHM05A1.lib	Mon May 08 15:53:01 2017 +0000
+++ b/X-NUCLEO-IHM05A1.lib	Fri Jul 28 13:07:13 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST/code/X-NUCLEO-IHM05A1/#f0856e278c08
+https://developer.mbed.org/teams/ST/code/X-NUCLEO-IHM05A1/#c73faac7197f
diff -r 27124344c5e5 -r baedd289a8cc main.cpp
--- a/main.cpp	Mon May 08 15:53:01 2017 +0000
+++ b/main.cpp	Fri Jul 28 13:07:13 2017 +0000
@@ -293,7 +293,9 @@
   
   /* Infinite Loop. */
   printf("--> Infinite Loop...\r\n");
-  while (true) {
+  //while (true) {
+  int i;
+  for (i = 0; i < 2; i++) {
     /* Request device to go position -3200 */
     motor->go_to(-3200);
 
diff -r 27124344c5e5 -r baedd289a8cc mbed.bld
--- a/mbed.bld	Mon May 08 15:53:01 2017 +0000
+++ b/mbed.bld	Fri Jul 28 13:07:13 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/aae6fcc7d9bb
\ No newline at end of file
+https://mbed.org/users/mbed_official/code/mbed/builds/a97add6d7e64
\ No newline at end of file