![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Simple code to run steps
Dependencies: X-NUCLEO-IHM05A1 mbed
Fork of HelloWorld_IHM05A1 by
Diff: main.cpp
- Revision:
- 10:93b6d1b02071
- Parent:
- 9:4b2736fbecdf
--- a/main.cpp Mon Jan 01 11:02:36 2018 +0000 +++ b/main.cpp Sun Jan 14 10:05:05 2018 +0000 @@ -66,16 +66,16 @@ /* Initialization parameters of the motor connected to the expansion board. */ l6208_init_t init = { - 400, //Acceleration rate in step/s^2 or (1/16)th step/s^2 for microstep modes - 30, //Acceleration current torque in % (from 0 to 100) - 400, //Deceleration rate in step/s^2 or (1/16)th step/s^2 for microstep modes - 30, //Deceleration current torque in % (from 0 to 100) - 20, //Running speed in step/s or (1/16)th step/s for microstep modes - 30, //Running current torque in % (from 0 to 100) - 20, //Holding current torque in % (from 0 to 100) + 100, //Acceleration rate in step/s^2 or (1/16)th step/s^2 for microstep modes + 50, //Acceleration current torque in % (from 0 to 100) + 100, //Deceleration rate in step/s^2 or (1/16)th step/s^2 for microstep modes + 50, //Deceleration current torque in % (from 0 to 100) + 100, //Running speed in step/s or (1/16)th step/s for microstep modes + 50, //Running current torque in % (from 0 to 100) + 50, //Holding current torque in % (from 0 to 100) STEP_MODE_HALF, //Step mode via enum motorStepMode_t - FAST_DECAY, //Decay mode via enum motorDecayMode_t - 0, //Dwelling time in ms + SLOW_DECAY, //Decay mode via enum motorDecayMode_t + 10, //Dwelling time in ms FALSE, //Automatic HIZ STOP 100000 //VREFA and VREFB PWM frequency (Hz) };