Closed Holgervisitinggithub closed 2 years ago
I noticed as well that the wiring and code are inconsistent.
And I would recommend to take the chance to rename this piece of code:
The pin n. 4 (arduino side) is connected to the SLEEP and not the ENABLE pin on the driver side. It would be advisable for code clarity to rename this #define as :
and change accordingly this line in setup():
stepper.setEnablePin(PIN_DRIVER_ENABLE);
to
stepper.setEnablePin(PIN_DRIVER_SLEEP);
Hey thanks! I updated the picture and changed the name to PIN_DRIVER_SLEEP
:+1: (You may have to clear your cache to see the updated image)
thank you for sharing your nice code!
PS: I added to my own copy a TM1637 6 digit display, just to show the current position also when operations are manual. It only requires 2 arduino DIO pins and the library TM1637TinyDisplay6
Disclaimer: I am no expert at all, but at least it worked for me.
Picture of the wiring from A4988 to the arduino seems to be wrong. The "DIR" pin from A4988 needs to be connected with D3 instead of D5 The "Step" pin needs to be connected with D5 instead of D6
according to the code
define PIN_DRIVER_DIR 3
define PIN_DRIVER_STEP 5
Thank you for the great work! !