Simple Arduino code to run 5 stepper motors

Simple Arduino code to run 5 stepper motors


Job Description

Thank you for reading my post.

First a little about me. I have an intermediate background in webpage coding, mainly PHP CSS HTML and EXCEL MACROS. I am short on time and could use some help from an experienced programmer to minimize my learning curve in this new field of C++ or whatever coding method is best for this.

I have the arduino software on my computer so I can update the processor chip with the code. Im currently needing the proper code that will allow me to do what Im needing for a simple assembly line setup.

My components Im using:
1 x Arduino UNO ATMega 328P
5 x L298N Stepper Motor Driver Controller Board Module
5 x Japan Servo Motor# KH42JM2-038. 6-pin connector, 1.8 Degree/ step motor
3 x ON/OFF toggle switch
4 x Potentiometer
1 x IR eye switch

I have written a detailed outline of the functions of the motors in the attached excel file. Please see before quoting me.

In short:
Motor 1 and 2 will not be synchronized, but will perform the exact same ways.
( switch on/off, continuous run, with POT speed control )

Motor 3 and 5 will by synchronized to move at the same times.
(IR eye switch activates motor to run a full rotation at an adjustable speed set by the POT )

Motor 4 On/off toggle switch to activate, then rotates 18 degrees or 20 steps with an adjustable delay between cycles adjusted by a POT. The Rotation speed is a constant speed of 1/2 rotation per second ( non adjustable )

Again, please review the attached file for more details of the motor functions.

I am also needing some instruction on how to wire it up based on the Pins set on the arduino for each motor, POT, and switch.

Im hoping that someone can help to complete this code for me because I know it should be simple if you have worked with this before. These codes are pretty straight forward and the functions are consistent.

Thanks, I also have future projects coming up soon.

Open Attachment