Linear interpolation – Electronics Scriblab

Linear interpolation

As I researched about my own custom G-Code interpreter on the Arduino I realised that it was neccesary to interpolate between two points in space. Thats because when both stepper motors step at the same time at the exact same speed a target value is reached too soon when one coordinate is not equal to the other ( x != y).

To avoid that problem one has to interpolate between the points and check if the interpolated value has to in- or decrement. I came up with this function to return an interpolated coordinate on the vector between the points:

Some reference and further reading on that topic here!

15. July 2013 by Marius
Categories: Programming | Tags: , , | Leave a comment