1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-22 11:52:14 +01:00

9 Commits

Author SHA1 Message Date
Claudius Coenen
0a819edc54 removing unused variable from Stepper 2015-09-23 23:12:47 +02:00
Cristian Maglie
f2a8f517f0 Stepper: fixed indentation 2015-06-05 16:18:46 +02:00
Cristian Maglie
1064554b87 Stepper: optimization on timing calculations
micros() is now called only once per cycle (instead of 3).

The rollover check is superflous because the "last_step_time" field
is unsigned.
2015-06-05 16:18:46 +02:00
Cristian Maglie
0546bf04e0 Stepper library: updated version 2015-06-05 16:18:46 +02:00
Ryan Orendorff
50ca5d8f75 Stepper Library supports 5 phase, 5 wire motors. 2015-06-05 16:18:46 +02:00
ekozlenko
caf000b005 Fixed unsigned var and version note 2015-06-05 16:18:46 +02:00
ekozlenko
847816739f Update stepper library: High-speed stepping mod and timer rollover fix
When using the stepper library with a 1.8 degrees per step motor, and at high angular speeds, the current Stepper library leads to really loud and jittery rotation. This is due to the fact that the timing is calculated in milliseconds, and the delay length between steps is only 2.5 milliseconds when trying to spin at 120 rpm. Since only integer math is performed, you end up actually bouncing between different step delays, and thus speeds, from step to step instead of giving the motor a constant input.  Which causes the motor to freak out.

Changing the library to calculate the step delays in micros() solves that problem for any speed you can reasonably demand from your stepper motor. The down side is that the micros() counter rolls over every hour or so, and any move you perform after that point will hang your code. Easy fix for that is to add an || micros() - this->last_step_time < 0 to the while loop if statement in Stepper.cpp.
2015-06-05 16:18:46 +02:00
Arturo Guadalupi
9eb2bac42e First licenses review 2015-04-23 12:53:30 +02:00
Fede85
dc9c791070 Stepper library to the new format 2013-06-27 19:24:16 +02:00