Look at the firmware for blot
Find a handy function called goTo
Input points 1,1 in the function(this is a 45 degree line)
Run the points to the function and realize that it excactly lines up with the freuncies found earlier
The function: y=sin(angle) x=cos(angle) motor1Target = (x + y) - pos[0]; motor2Target = (y - x) - pos[1]; motor2Speed = abs(motor2Target) / motor1Target; stepDuration = 500; motor2StepInterval = stepDuration / motor2Speed; //microseconds //convert interval to freq freq = 1000000/m2step
reverse the function so it takes in the freq and outputs the angle
1 Complicated math later...
tan-1(2000-freq /2000+freq)