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.

Revision:
9:be4faa697346
Parent:
8:05340e740644
--- 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    */