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.
servo '1' to 90 deg and to 0 deg after 3 seconds delay
stepper '1' for 30000 steps at 100 rpm in clockwise direction
stepper 'a' for 120 degrees or steps required to turn 120 degrees
servo '1' to 90 deg and to 0 deg after 3 seconds delay
stepper 'a' for 120 degrees or steps required to turn 120 degrees
servo '1' to 90 degrees and to 0 degrees after 3 seconds delay
stepper '1' for 3000 steps at 100 rpm in anticlockwise direction
stepper '2' at 300 rpm for 400000 steps in clockwise direction and after 3 seconds delay 400000 steps in anticlockwise direction at 500 rpm.
stepper 'a' for 120 degrees or steps required to turn 120 degrees
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.