This code allows you to control a stepper motor with a momentary switch button.
## Using the Winder
On powerup, the LED will fade on an the winder will be in standby, waiting for a button press.
On powerup, the LED will fade on and the winder will be in standby, waiting for a button press.
The button knows two types of inputs:
***press**, which is input shorter than 500ms
...
...
@@ -12,11 +12,11 @@ The button knows two types of inputs:
The winder works in cycles, which means it will do the configured number of cycles (`CYCLES`), with each cycle consisting of a configured number of rotations in each direction (`ROT_R`, `ROT_L`), then wait for the
configured amount of minutes (`PAUSE_MIN`), and eventually restart the cycles. This will be refered to as "_winding_".
In short:
### The very short version of a manual:
* press the button to start winding
* long-press the button to stop winding
### Switching Modes
### Switching Modes (a.k.a the slightly longer version of a manual)
* When pressing the button while the winder is in standby, it will start winding.
* When long-pressing the button while it is winding, it will return to the home position and stop winding.
* When long-pressing the button while it is waiting for the next cycle, it will stop winding.