gin66 / FastAccelStepper

A high speed stepper library for Atmega 168/328p (nano), Atmega32u4, Atmega 2560, ESP32, ESP32S2, ESP32S3, ESP32C3 and Atmel SAM Due
MIT License
282 stars 67 forks source link

Step forward and back outputs #237

Closed pvhoof closed 4 months ago

pvhoof commented 4 months ago

Can you add support for drivers that require forward backward step signals rather than step/direction? I'm not sure if there is a version that can do this.

gin66 commented 4 months ago

There is no version, which can do this. Implementing this very specific interface for all supported uC seems a lot of work for little effect supporting this non-standard interface. Especially the switch over of the pulse generator for esp32 is not easy and may introduce glitches. For avr is limited by timer associated stepper pins.

Alternative solutions with current FastAccelStepper:

pvhoof commented 4 months ago

Being too much effort, I understand. I will attempt to solve this initially by using the step output to trigger an interrupt on change routine in which I pulse appropriate step pins depending on the direction output. in this particular program the esp32 has very little work to do besides from running the stepper so CPU time wouldn't be an issue. If I can't get this to work, I will use some gates to generate the signals.

Thank you for considering this, answering my question and writing such a wonderful library.