Hello everyone,
I'm working on a programming project that serves as a thesis for my degree, which involved an XYZ positioning system, although I only need precise movement in XY, since I would need it to control the holder for the coconut.
Here are the problems I have at the moment:
-
How would I be able to move the motors at the same time?
-
How would I use the circle algorithm to correctly move the holder from one location to another?
-
How do I send the float/long data from raspberry pi to Arduino?
I have already made a program for that purpose, but then there was a problem with the execution, for the motors didn't seem to work at all, and if it did, one motor would run before another runs when they're supposed to run at the same time to arrive at a certain destination.
Even when that's done, there's still the plotting problem, for I have smashed my head trying to find a way to solve this. I have thought to plot x and y by running a program that would count a value per pulse of a x or y motor. Hopefully it would yield some great results.
Here is the config:
- All three stepper motors use 2 pins for both direction and speed.
- There are stopper pins that determine the max and min limits for all motors.
- The program will move after getting the radius from the raspberry pi.
- I have made modules for positive and negative movement on all motors, as well as conditions that determine which motor to use based on the current and next position in the Cartesian plane.
Another thing that confuses the heck out of me is how do I interpret the values from the module to allow the program to properly move to that position. I don't know as to how would I meaningfully use data from the module since it's using long float numbers. Here's what I mean by that:
I have attached the code to the project in this forum.
Thanks in advance!
coconut_processing.ino (6.47 KB)