Perhaps I may be misunderstanding your code, but I don't see where the code changes the state of the direction pin.
I seeBut in set_direction, I don't see anything that affects the output device.
If you change the code snippet above to The motor will most likely go in the reverse direction.
I see
Code:
direction = OutputDevice(dir_pin, active_high=True) # Active high to rotate CW
If you change the code snippet above to
Code:
direction = OutputDevice(dir_pin, active_high=False) # Active low to rotate CCW
Statistics: Posted by MrYsLab — Fri Dec 13, 2024 9:08 pm