Can someone help me with some guidance on what I have to do to integrate closed loop control on the Nema 17? First of all i would like to be able to make the motor spin and in the same time to receive information from encoder on I2C communication. Thx
Welcome to the forum.
Could you please post your code in code-tags as per forum guidelines?
And also a circuit diagram of your setup?
Just as a side note:
Firstly, using a stepper should help avoid the need for the position feedback, unless you are worried about overdriving the capabilities of the stepper.
Secondly, closed loop stepper solutions are available if you so choose, but at the cost of needing a driver that can receive motor feedback.