I am driving stepper motor using CNC shield with(A4988 ) driver and arduino Mega and also I am using HMC5883L compass . HMC5883L is mount on the stepper motor shaft
I am reading HMC5883L to detect the angle and base on the angle will decided the rotation direction
My Question is
when I read the HMC5883L sensor it will take long time hence stepper motor speed become very slow, Please advice to overcome this issue