hey there community;
I'm interested in arduino for a few month now, so not a complete beginner but also not that advanced with programming.
I'm working on a project wich I already saw a lot of others doing it. you can find it under the names 2-d plotter, polargraph or makelangelo.
short: i want to stepper motors to do some steps go get the pencil to a position. after that i want to give them a new pair of 2 variables (int) to move them to an other position.
my problem :
those steps have to be calculated wich pythagoras ( i need the new lengh of the ropes ), so i calculate the old lenghts and the new ones, the difference are the distance to go wich i can convert to steps.
The thng is moving .. BUT : everytime it hits a checkpoint, it stops and needs quite a bit of time to calculate the new steps to make. i want to get rid of that.
i found out, that square roots etc are making the program slowly.
i cant think of a way to do this without the calculations so i want them all to be calculated at the beginning, so when the steppers finished their first moves, they instantly get the new information where to step next.
is there a way i can pre calculate and save these data? i think we are not talkig about 100 variables, but more of 10.000.
besides arduino IDE i never tried anything else , but i saw someone using a tool, wich seems to do exactly this what i need (pre calculating the movements and then starting the arduino to move).
how does those programmms comunicate ?
how can i write my own programm wich tells the arduino IDE where to move the steppers next?
my guess is, that the computer i'm working with is saving all the data, and gives the new steps to the arduino IDE via serial input?
is somone having experience with this kind of stuff?
or do you even have an idea how to do this plotter smarter and fast enough, that the arduino calculated all that?
thank you a lot, I'm struggeling with this for weeks now.