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

Dependencies:   X_NUCLEO_IHM04A1 mbed

Dependents:   SimplePIDBot

Fork of HelloWorld_IHM04A1 by ST Expansion SW Team

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

It shows how to use four unidirectional brush DC motors connected to the board by running the four motor in parallel. At the beginning, no motor is running. Each time the user presses the user button, a new brush DC motor is activated. Motors run during one second, stop during one second and run again.

  • motor 1 runs at 20% of maximum speed.
  • motor 2 runs at 30% of maximum speed.
  • motor 3 runs at 40% of maximum speed.
  • motor 4 runs at 50% of maximum speed.

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

Files at this revision

API Documentation at this revision

Comitter:
Davidroid
Date:
Thu Aug 03 16:33:35 2017 +0000
Parent:
8:05340e740644
Commit message:
Updating with new version of the libraries.

Changed in this revision

X_NUCLEO_IHM04A1.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 05340e740644 -r be4faa697346 X_NUCLEO_IHM04A1.lib
--- a/X_NUCLEO_IHM04A1.lib	Wed May 24 15:36:18 2017 +0000
+++ b/X_NUCLEO_IHM04A1.lib	Thu Aug 03 16:33:35 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM04A1/#51ad3c4b904c
+https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM04A1/#d16ad1d58ea1
diff -r 05340e740644 -r be4faa697346 main.cpp
--- a/main.cpp	Wed May 24 15:36:18 2017 +0000
+++ b/main.cpp	Thu Aug 03 16:33:35 2017 +0000
@@ -163,7 +163,11 @@
     /*----- Initialization. -----*/
 
     /* Initializing Motor Control Component. */
-    motor = new L6206( D2, A4, D5, D4, A0, A1);
+#ifdef TARGET_STM32F429
+    motor = new L6206(D2, A4, PB_4, PC_7, PA_15, PB_3);
+#else
+    motor = new L6206(D2, A4, D5, D4, A0, A1);
+#endif
 
     /* When init method is called with NULL pointer, the L6206 parameters are set   */
     /* with the predefined values from file l6206_target_config.h, otherwise the    */
diff -r 05340e740644 -r be4faa697346 mbed.bld
--- a/mbed.bld	Wed May 24 15:36:18 2017 +0000
+++ b/mbed.bld	Thu Aug 03 16:33:35 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/a97add6d7e64
\ No newline at end of file