/*
Based on Arduino Discussion:
https://forum.arduino.cc/t/change-stepper-dir-according-to-predifined-analog-input-value
https://forum.arduino.cc/t/stepper-driver-with-quadrature-from-stepper-h-or-encoder
Clock - XOR Stepper Driver:
Note: Possibly the XOR logic implementation or the scope sampling is creating the timing
issue as seen on the scope, but it still appears to work - D. Lloyd
A4988: DIR | STEP
Encoder: PinA | PinB
Encoder: CLK | DT
Gray Code: Bit0 | Bit1
2 Input XOR: A | Out
0 | 0
1 | 0
1 | 1
0 | 1
Other: micros() to Gray Code conversion.
*/
void setup() { }
void loop() { }
PRESS TO REVERSE
B
A
ERC Warnings
flipflop6:CLK: Clock driven by combinatorial logic