theelims / StrokeEngine

A library to create a variety of stroking motions with a stepper or servo motor on an ESP32.
MIT License
30 stars 13 forks source link

invertDirection not implemented #3

Closed Nilsk1lz closed 2 years ago

Nilsk1lz commented 2 years ago

invertDirection does not appear to be implemented. Is there an easy way to invert the motor direction?

theelims commented 2 years ago

Hi,

you're right, this feature went missing with the last code refactoring. And somehow it escaped testing. It will return with the next release cycle.

Depending on your hardware you've several options. If you use the iHSV57 servo there is a dip switch (S6) which changes the direction. Most other drivers have a similar functionality. On a stepper it is as simple as switching to wires of one coil (A+ --> A-, A- --> A+).

I hope this helped.

Cheers, elims

theelims commented 2 years ago

The issue is fixed in the current main branche.