775 DC Motor Speed Control using Arduino

Copy the code from Here ---


//775 DC Motor Speed Control

//SUBSCRIBE to Our Channel For More Videos "SAYAN DALAL"


int ENA = 5; int in1 = 4; int in2 = 3; void setup() { Serial.begin(9600); pinMode(ENA, OUTPUT); pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); } void loop() { digitalWrite(in1,LOW); digitalWrite(in2,HIGH); for (int i=0; i<255; i++) // increase motor speed from o to max { analogWrite(ENA, i); delay(40); } for (int i=255; i>0; --i) // decrease Motor Speed from Max to 0 { analogWrite(ENA, i); delay(40); } }

351 views

Recent Posts

See All

Code for Automated Hand Wash By Arduino Uno

Copy the Code here ---- #include <Servo.h> #define irsensor 3 // connect the IR sensor to PIN 3 Servo myservo; int pos = 0; // variable to store the servo position void setup() { myservo.attac