Skip to main content
added 583 characters in body
Source Link
YaddyVirus
  • 292
  • 1
  • 6
  • 21

I am controlling 2 motors from my Arduino Pro Mini and L293D motor driver module. Problem is, I have to set a pin high and after 1 second set it to LOW. But that doesn't happen... The pin just stays HIGH and is never LOW.

Here's my Code -

 int IN2Left = 10;  int E1 = 12;  int E2 = 7;  int IN3RevRight = 6;  int trigPin1 = A0;  int echoPin1 = A1;  int distance1 = 0;  int IN4Right = 5;  int IN1RevLeft = 11;    void setup()  {   pinMode(IN2Left, OUTPUT);   pinMode(E1, OUTPUT);   pinMode(E2, OUTPUT);   pinMode(IN3RevRight, OUTPUT);   pinMode(IN4Right, OUTPUT);   pinMode(IN1RevLeft, OUTPUT);   pinMode(trigPin1, OUTPUT);   pinMode(echoPin1, INPUT);   pinMode(13, OUTPUT);   Serial.begin(9600);  }    void loop() { digitalWrite(13, HIGH); digitalWrite(E1, HIGH); digitalWrite(E2, HIGH); digitalWrite(IN2Left, HIGH); digitalWrite(IN4Right, HIGH);   delay(3000);  digitalWrite(IN2LeftIN4Right, LOW); digitalWrite(IN3RevRight,HIGH); delay(500); digitalWrite(IN3RevRight, LOW);  digitalWrite(IN4Right, HIGH); delay(10001500); digitalWrite(IN2Left, LOW);  digitalWrite(IN1RevLeft, HIGH); delay(500); digitalWrite(IN1RevLeft, LOW); digitalWrite(IN2Left, HIGH); delay(100000); } 

The IN2Left Pin never goes LOW... I am assuming a faulty Arduino but my Arduino seems to be working just fine as it runs other stuff (tested blink and reading an Ultrasonic sensor) just fine.

My deadline is 2 hours from now...

EDIT: Here's the complete void loop function... Note the two pins on top which go HIGH? They Never go LOW again in the entire code.

I am controlling 2 motors from my Arduino Pro Mini and L293D motor driver module. Problem is, I have to set a pin high and after 1 second set it to LOW. But that doesn't happen... The pin just stays HIGH and is never LOW.

Here's my Code -

int IN2Left = 10; int E1 = 12; int E2 = 7; int IN3RevRight = 6; int trigPin1 = A0; int echoPin1 = A1; int distance1 = 0; int IN4Right = 5; int IN1RevLeft = 11; void setup() { pinMode(IN2Left, OUTPUT); pinMode(E1, OUTPUT); pinMode(E2, OUTPUT); pinMode(IN3RevRight, OUTPUT); pinMode(IN4Right, OUTPUT); pinMode(IN1RevLeft, OUTPUT); pinMode(trigPin1, OUTPUT); pinMode(echoPin1, INPUT); pinMode(13, OUTPUT); Serial.begin(9600); } void loop() { digitalWrite(13, HIGH); digitalWrite(E1, HIGH); digitalWrite(E2, HIGH); digitalWrite(IN4Right, HIGH); digitalWrite(IN2Left, HIGH); delay(1000); digitalWrite(IN2Left, LOW); } 

The IN2Left Pin never goes LOW... I am assuming a faulty Arduino but my Arduino seems to be working just fine as it runs other stuff (tested blink and reading an Ultrasonic sensor) just fine.

My deadline is 2 hours from now...

I am controlling 2 motors from my Arduino Pro Mini and L293D motor driver module. Problem is, I have to set a pin high and after 1 second set it to LOW. But that doesn't happen... The pin just stays HIGH and is never LOW.

Here's my Code -

 int IN2Left = 10;  int E1 = 12;  int E2 = 7;  int IN3RevRight = 6;  int trigPin1 = A0;  int echoPin1 = A1;  int distance1 = 0;  int IN4Right = 5;  int IN1RevLeft = 11;    void setup()  {   pinMode(IN2Left, OUTPUT);   pinMode(E1, OUTPUT);   pinMode(E2, OUTPUT);   pinMode(IN3RevRight, OUTPUT);   pinMode(IN4Right, OUTPUT);   pinMode(IN1RevLeft, OUTPUT);   pinMode(trigPin1, OUTPUT);   pinMode(echoPin1, INPUT);   pinMode(13, OUTPUT);   Serial.begin(9600);  }    void loop() { digitalWrite(13, HIGH); digitalWrite(E1, HIGH); digitalWrite(E2, HIGH); digitalWrite(IN2Left, HIGH); digitalWrite(IN4Right, HIGH);   delay(3000);  digitalWrite(IN4Right, LOW); digitalWrite(IN3RevRight,HIGH); delay(500); digitalWrite(IN3RevRight, LOW);  digitalWrite(IN4Right, HIGH); delay(1500); digitalWrite(IN2Left, LOW);  digitalWrite(IN1RevLeft, HIGH); delay(500); digitalWrite(IN1RevLeft, LOW); digitalWrite(IN2Left, HIGH); delay(100000); } 

The IN2Left Pin never goes LOW... I am assuming a faulty Arduino but my Arduino seems to be working just fine as it runs other stuff (tested blink and reading an Ultrasonic sensor) just fine.

My deadline is 2 hours from now...

EDIT: Here's the complete void loop function... Note the two pins on top which go HIGH? They Never go LOW again in the entire code.

Source Link
YaddyVirus
  • 292
  • 1
  • 6
  • 21

Cannot set Pins to LOW

I am controlling 2 motors from my Arduino Pro Mini and L293D motor driver module. Problem is, I have to set a pin high and after 1 second set it to LOW. But that doesn't happen... The pin just stays HIGH and is never LOW.

Here's my Code -

int IN2Left = 10; int E1 = 12; int E2 = 7; int IN3RevRight = 6; int trigPin1 = A0; int echoPin1 = A1; int distance1 = 0; int IN4Right = 5; int IN1RevLeft = 11; void setup() { pinMode(IN2Left, OUTPUT); pinMode(E1, OUTPUT); pinMode(E2, OUTPUT); pinMode(IN3RevRight, OUTPUT); pinMode(IN4Right, OUTPUT); pinMode(IN1RevLeft, OUTPUT); pinMode(trigPin1, OUTPUT); pinMode(echoPin1, INPUT); pinMode(13, OUTPUT); Serial.begin(9600); } void loop() { digitalWrite(13, HIGH); digitalWrite(E1, HIGH); digitalWrite(E2, HIGH); digitalWrite(IN4Right, HIGH); digitalWrite(IN2Left, HIGH); delay(1000); digitalWrite(IN2Left, LOW); } 

The IN2Left Pin never goes LOW... I am assuming a faulty Arduino but my Arduino seems to be working just fine as it runs other stuff (tested blink and reading an Ultrasonic sensor) just fine.

My deadline is 2 hours from now...