Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BufferedSerial X_NUCLEO_IHM01A1 mbed
Fork of Stepper_Matlab_Control by
Revision 3:40a6b7ff62ea, committed 2016-07-25
- Comitter:
- STM32Workshop
- Date:
- Mon Jul 25 13:29:26 2016 +0000
- Parent:
- 2:20308d48e34d
- Commit message:
- Fixes due to library update
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jul 25 09:21:34 2016 +0000
+++ b/main.cpp Mon Jul 25 13:29:26 2016 +0000
@@ -52,8 +52,8 @@
// Stepper Variables:
#define STEPS2ROTATION 3200.0f // 200 steps rotation 16 microsteps
/* Initialization parameters. */
-// not sure if it acctually uses it
-L6474_InitTypeDef init =
+/* Initialization parameters of the motor connected to the expansion board. */
+L6474_Init_t init =
{
50, /* Acceleration rate in step/s2. Range: (0..+inf). */
50, /* Deceleration rate in step/s2. Range: (0..+inf). */
@@ -142,7 +142,7 @@
// Disabling motor
StepperMotor->Disable();
/* Changing step mode. */
- StepperMotor->SetStepMode(STEP_MODE_1_16);
+ StepperMotor->SetStepMode((StepperMotor::step_mode_t) STEP_MODE_1_16);
/* Increasing the torque regulation current to 500mA. */
StepperMotor->SetParameter(L6474_TVAL, 500);
