Quantcast
Viewing all articles
Browse latest Browse all 4933

Python • Re: Struggling with GPIOZero for Motor Control Using TB6600 Microstep Driver

Perhaps I may be misunderstanding your code, but I don't see where the code changes the state of the direction pin.

I see

Code:

direction = OutputDevice(dir_pin, active_high=True)  # Active high to rotate CW
But in set_direction, I don't see anything that affects the output device.

If you change the code snippet above to

Code:

direction = OutputDevice(dir_pin, active_high=False)  # Active low to rotate CCW
The motor will most likely go in the reverse direction.

Statistics: Posted by MrYsLab — Fri Dec 13, 2024 9:08 pm



Viewing all articles
Browse latest Browse all 4933

Trending Articles