Example program for library X-NUCLEO-IHM12A1 using two low voltage dual brush DC motors

Dependencies:   X_NUCLEO_IHM12A1 mbed

Fork of HelloWorld_IHM12A1 by ST Expansion SW Team

This application provides a simple example of usage of the X-NUCLEO-IHM12A1 Dual Brush DC Motor Control Expansion Board.

It shows how to use 2 bidirectional brush DC motors connected to the board by executing a 13 steps loop:

  • Step 0) Motor 0 runs in forward at 100% of max speed, Motor 1 is inactive
  • Step 1) Motor 0 runs in forward at 75% of max speed, Motor 1 runs in backward at 100% of max speed
  • Step 2) Motor 0 runs in forward at 50% of max speed, Motor 1 runs in backward at 75% of max speed
  • Step 3) Motor 0 runs in forward at 25% of max speed, Motor 1 runs in backward at 50% of max speed
  • Step 4) Motor 0 is stopped, Motor 1 runs in backward at 25% of max speed
  • Step 5) Motor 0 runs in backward at 25% of max speed, Motor 1 is stopped
  • Step 6) Motor 0 runs in backward at 50% of max speed, Motor 1 runs in forward at 25% of max speed
  • Step 7) Motor 0 runs in backward at 75% of max speed, Motor 1 runs in forward at 50% of max speed
  • Step 8) Motor 0 runs in backward at 100% of max speed, Motor 1 runs in forward at 75% of max speed
  • Step 9) Motor 0 runs in backward at 100% of max speed, Motor 1 runs in forward at 100% of max speed
  • Step 10) Stop both motors and disable bridges
  • Step 11) Motor 0 runs in forward at 100% of max speed, Motor 1 runs in forward at 100% of max speed
  • Step 12) Stop both motors and enter standby mode

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

Files at this revision

API Documentation at this revision

Comitter:
Davidroid
Date:
Thu Aug 09 15:01:16 2018 +0000
Parent:
8:7dccd03ea2bc
Commit message:
Update with the new version of the motor library

Changed in this revision

X-NUCLEO-IHM12A1.lib 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 7dccd03ea2bc -r 371f9bb009e0 X-NUCLEO-IHM12A1.lib
--- a/X-NUCLEO-IHM12A1.lib	Tue Aug 22 11:59:32 2017 +0000
+++ b/X-NUCLEO-IHM12A1.lib	Thu Aug 09 15:01:16 2018 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM12A1/#123d44b9fb9d
+https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM12A1/#6efcc9b4d810
diff -r 7dccd03ea2bc -r 371f9bb009e0 mbed.bld
--- a/mbed.bld	Tue Aug 22 11:59:32 2017 +0000
+++ b/mbed.bld	Thu Aug 09 15:01:16 2018 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/mbed/builds/e2bfab296f20
\ No newline at end of file
+https://os.mbed.com/users/mbed_official/code/mbed/builds/a7c7b631e539
\ No newline at end of file