Project Using Three Servos and One Stepper Motor

Hello all!

I am fairly new to arduino and not very skillful at the coding. My project involves using three servos and a stepper motor. I am creating an arm that rotates at three points (the three servos) and also moves on a track (stepper). I want each task to be completed one after the other. I need the servos to rotate seperatly and hold the rotations until the stepper moves the arm. Would the best way to do these operations be using the millis() command? I realized that using the delay command would halt any code following the delay.

Any advice would be greatly appreciated.

If you want each task to be completed one after the other, then the motors are moving sequentially so move the first one, then the second, then the third, etc.

If you want them to all be moving at the same time, the AccelStepper library has the ability to control multiple motors that move at the same time.

I seeā€¦ so does this work with servos or just steppers? The idea is to use a servo to open and close a claw and the other to rotate the claws position. The other servo would be used to raise and lower the arm using gears. The stepper is used to move the entire arm.

The AccelStepper library is just for stepper motors.

The Servo library is for servos. Doing what you want with the servos should be no problem - just use Servo.write() or Servo.writeMicroseconds() to tell a servo to move to the desired position.

However a stepper motor requires to be sent a series of step pulses to get it to move.

These links may help.
Stepper Motor Basics
Simple Stepper Code

Also have a look at how millis() is used to manage timing without blocking in Several Things at a Time.

And see Using millis() for timing. A beginners guide if you need more explanation.