I got some ams rotary encoders and some Nema 17 and I am trying to build my own closed-loop servo. I am using the AS5048a Library by by ZoetropeLabs:
and the common AccelStepper Library.
Both on its own works fine, I can read the sensordata via SPI and control the motors without problems, yet if I try to read sensordata and control a motor in the same code, the motor won't work.
The motor just buzzes and vibrates- like when you do too many serial prints. i dont rly know why this happens and need some advice to solve my problem.