Point to Actuation Code
The firmware, developed using the Arduino IDE with the AccelStepper library, manages precise motor actuation based on target coordinates. It calculates cable lengths, translates them into motor steps, and ensures synchronized motion to keep the board within the frame boundaries. Key functions like setCurrentPosition and calculateLengths enable accurate control, while a structured pipeline handles initialization, coordinate input, and smooth movement execution.
Detailed descriptions of their methods can be found at: https://hackaday.io/project/183279-accelstepper-the-missing-manual/details. Here is a description of the key functions from the AccelStepper and MultiStepper libraries.
Sets the current position of a stepper motor in steps. Used in setup to define the initial positions of the motors.
Computes the target step positions for each motor to move the board to a specific (x,y) coordinate. Takes targetX and targetY as inputs, and uses the pythagorean theorem to calculate the cable length from each motor to the target position, considering the dimensions of the board.
Moves the motors to their specified target positions at a constant speed. Handles acceleration and deceleration as motors approach their targets, preventing overshooting.
Website Builder Software