Ramji Patel
Published © GPL3+

Arduino DVD motor

Driving DVD motor using an arduino UNO and motor shield

BeginnerWork in progress2,530
Arduino DVD motor

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Development Board, Motor Control Shield
Development Board, Motor Control Shield
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Code

Arduino DVD Motor

C/C++
Copy my sketch and paste it on your arduino ide
/Arduino.cc/
/Ramji Patel376/

#include <AFMotor.h>
#include <Servo.h>

AF_DCMotor motor1(3);
AF_DCMotor motor2(2);

void setup() {
  // put your setup code here, to run once:
motor1.setSpeed(200);
motor1.run(RELEASE);
motor2.setSpeed(200);
motor2.run(RELEASE);
}

void loop() {
  // put your main code here, to run repeatedly:
motor1.run(FORWARD);
motor2.run(FORWARD);
delay(2100);
motor2.run(BACKWARD);
motor1.run(BACKWARD);
delay(2100);
}

Credits

Ramji Patel

Ramji Patel

26 projects • 18 followers
Myself Ramji Patel. I am an Engineering student and pursuing my B-Tech from Institute of engineering and rural Technology Prayagraj, India.

Comments