This document provides reference information about the functions used to control stepper motors in the Arduino project. Each function is described with its purpose, parameters, and behavior.
Sets the direction of the Y-axis motor.
- Parameters:
foo
(bool): Iftrue
, sets the direction to clockwise; iffalse
, sets it to counterclockwise.
Spins the X and Y motors continuously at specified speeds until a button is pressed.
- Parameters:
speedRPMX
(float, default = 60): Speed of the X-axis motor in RPM.speedRPMY
(float, default = 60): Speed of the Y-axis motor in RPM.finalDelay
(int, default = 100): Delay in milliseconds after stopping the motors.
Spins the X and Y motors by specified degrees at specified speeds.
- Parameters:
degX
(float): Degrees to rotate the X-axis motor.degY
(float): Degrees to rotate the Y-axis motor.speedX
(float, default = 10): Speed of the X-axis motor in RPM.speedY
(float, default = 10): Speed of the Y-axis motor in RPM.finalDelay
(int, default = 100): Delay in milliseconds after stopping the motors.
Placeholder function for future implementation.
Calibrates the pulley teeth by rotating the motors in specific patterns.
Tests the spin_degs
function with multiple rotations.
Initializes the Arduino pins and serial communication, and prints a welcome message.
Main loop that reads the button state and performs actions based on the button press.
- Behavior:
- Turns off motors when the button is not pressed.
- When the button is pressed, it turns on the motors, lights up the built-in LED, and runs calibration and test functions.