Copy//Includes the Arduino Stepper Library #include <Stepper.h> // Defines the number of steps per rotation const int stepsPerRevolution = 2038; // Creates an instance of stepper class // Pins entered in sequence IN1-IN3-IN2-IN4 for proper step sequence Stepper myStepper = Stepper(stepsPerRevolution, 8, 10, 9, 11); void setup() { // Nothing to do (Stepper Library sets pins as outputs) } void loop() { // Rotate CW slowly at 5 RPM myStepper.setSpeed(5); myStepper.step(stepsPerRevolution); delay(1000); // Rotate CCW quickly at 10 RPM myStepper.setSpeed(10); myStepper.step(-stepsPerRevolution); delay(1000); }Copy// L293D // Motor A const int motorPin1 = 5; // Pin 14 of L293 const int motorPin2 = 6; // Pin 10 of L293 // This will run only one time. void setup() { // Set pins as outputs pinMode(motorPin1, OUTPUT); pinMode(motorPin2, OUTPUT); } void loop() { for (int i = 0; i < 5; i++) { // Motor Control - Motor A: motorPin1,motorpin2 // This code will turn Motor A clockwise for 2 sec. digitalWrite(motorPin1, HIGH); digitalWrite(motorPin2, LOW); delay(2000); // This code will turn Motor A counter-clockwise for 2 sec. digitalWrite(motorPin1, LOW); digitalWrite(motorPin2, HIGH); delay(2000); // And this code will stop motors digitalWrite(motorPin1, LOW); digitalWrite(motorPin2, LOW); delay(1000); } }