Interfacing DC Motor With Arduino UNO | Embedded System | New Topic [2023] - Poly Notes Hub
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy
Interfacing DC Motor With Arduino UNO | Embedded System | New Topic [2023]
In this article, Poly Notes Hub shares knowledge on how to interfacing dc motor with Arduino UNO. In this article, we will know about the circuit diagram, working principle, and the Code also.
void setup() {
pinMode(12, OUTPUT); // l293d pin2 connected with D12 of Arduino
pinMode(11, OUTPUT); // l293d pin7 connected with D11 of Arduino
pinMode(10, OUTPUT); // l293d pin10 connected with D10 of Arduino
pinMode(9, OUTPUT); // l293d pin15 connected with D9 of Arduino
}
void loop() {
digitalWrite(12, HIGH); // For Motor 1 and Motor 2 Clockwise Direction
digitalWrite(11, LOW);
digitalWrite(10, HIGH);
digitalWrite(9, LOW);
delay(3000); // Rotating Clockwise for 3 sec
digitalWrite(12, LOW); // For Motor 1 and Motor 2 Break
digitalWrite(11, LOW);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
delay(2000); // Stop for 2 Sec
digitalWrite(12, LOW); // For Motor 1 and Motor 2 Anti-Clockwise Direction
digitalWrite(11, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, HIGH);
delay(3000); // Rotating Clockwise for 3 sec
digitalWrite(12, LOW); // For Motor 1 and Motor 2 Break
digitalWrite(11, LOW);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
delay(2000); // Stop for 2 Sec
}
Video for Reference ( Interfacing DC Motor with Arduino UNO )
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy
Interfacing DC Motor With Arduino UNO | Embedded System | New Topic [2023] - Poly Notes Hub
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy
Interfacing DC Motor With Arduino UNO | Embedded System | New Topic [2023] - Poly Notes Hub
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy