I am an absolute beginner at this so I need a bit of advice.
I want to control 3 stepper motors in the following way with selection of the function by either a rotary switch giving a constant signal or with momentary push buttons.
The first function is for each stepper motor to give one full rotation in sequence and repeat this continuously.
The second function is for all 3 stepper motors to operate simultaneously.
The third function is for all motors to rotate to a fixed point (a home position) and then stop.
I want to use a UNO R3 with 3 x 4988 stepper motor drivers running 3 small stepper motors. This will have 2 power supplies, one for the Arduino UNO R3 and one for the stepper motors.
It is to drive a mechanism for a clock I am designing.
The issue I have is how do you include all 3 sets of instructions to the stepper motors in one sketch and is it possible to operate this from a rotary switch (or momentary push buttons) to select the operation of the stepper motors?
There should be no problem getting the motors to behave as you require. However you should avoid the standard Stepper library as it is not suitable. The AccelStepper library will be suitable, or just write your own code.
I suggest you start by writing three short programs that do each part separately.
I am grateful for the replies and the pointers to the relevant information in regards to my request.
I read through all of the pages of the links and whilst the information I was seeking was there I was a bit taken aback by the tetchiness of some of the forum members replying to the main threads but that is of no interest to me as it was information I was seeking and that was provided.
I will have to learn a lot to accomplish the end result and to do so I will work through the basics and develop what I need from that.
"Learn to walk before you try to run".
One further question, does the Arduino UNO R3 have sufficient memory space to accommodate what I require in the program that will operate this mechanical operation for the clock?
Roddy:
One further question, does the Arduino UNO R3 have sufficient memory space to accommodate what I require in the program that will operate this mechanical operation for the clock?
I would be very surprised if it does not. Work on the assumption that it has a lot more than you will need.
By the way - don't worry about "tetchiness" - just make use of the info. Even the tetchy ones usually have good advice.