My setup will be including 2timing 10mins and 50mins to execute action
The first cycle will be holding the object for 50mins
Next need the arduino to control the stepper motor to turn to lift up the object and hold for 10mins then next cycle the motor lower down and hold for 50mins
This will be the whole process
const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
void setup() {
// set the speed at 60 rpm:
myStepper.setSpeed(60);
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
// step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
delay(60000);
// step one revolution in the other direction:
Serial.println("counterclockwise");
myStepper.step(-stepsPerRevolution);
delay(3000000);
}
can this applicable for my experiment above?
if I want to change the number of rotations of the motor to a specific value what should I include or just change the const int stepsPerRevolution?
as for the 2timing can I just use the delay function to perform the task?