need code for controlling 3 steppers and one servo for my poject

hi guys!

i need help in coding arduino for controlling 3 steppers and a servo for my project. i dont need them to run at same time but i want them to run one at a time. servo should run in between frequently after a stepper completes its function. i plan to use bipolar motors and a motor shield because there are more than two motors. i need help in choosing the proper shield to which i can connect 3 steppers & 1 servo and also how to write code when shield is mounted on arduino for controlling the motors for my required function. here is my step by step motor function.

  1. servo '1' to 90 deg and to 0 deg after 3 seconds delay
  2. stepper '1' for 30000 steps at 100 rpm in clockwise direction
  3. stepper 'a' for 120 degrees or steps required to turn 120 degrees
  4. servo '1' to 90 deg and to 0 deg after 3 seconds delay
  5. stepper 'a' for 120 degrees or steps required to turn 120 degrees
  6. servo '1' to 90 degrees and to 0 degrees after 3 seconds delay
  7. stepper '1' for 3000 steps at 100 rpm in anticlockwise direction
  8. stepper '2' at 300 rpm for 400000 steps in clockwise direction and after 3 seconds delay 400000 steps in anticlockwise direction at 500 rpm.
  9. stepper 'a' for 120 degrees or steps required to turn 120 degrees
  10. end of program

Images from Original Post so we don't have to download them. See this Image Guide

...R

For the future please don't post pictures of text. Just copy and paste the text into your Post.

Have a look at these links
Stepper Motor Basics
Simple Stepper Code

also look up the AccelStepper library

...R

thanks for the suggestion plz tell me how to insert the image directly rather than inserting a link to the image

hi robin i have read the code you used to test the stepper motor my problem is how to write the code for 3 steppers and onee servo which should work together to get my required function in a single program. i can write the individual code for stepper and servo but i need code which can make all the motors functiin as per my requirement thankyou

siddhu108:
i can write the individual code for stepper and servo but i need code which can make all the motors functiin as per my requirement thankyou

Try extending it for a second stepper and if it does not work then post your best attempt and tell us exactly what it does and what you want it to do that is different.

I gave you a link to the image guide in Reply #1

...R