I was trying to use my L293D motor driver module. But when I upload the following sketch to try and run my motor, but it would get stuck on "Uploading". This happens with this sketch only, and happens randomly, with odds of happening being 3 in 5 times. After a bit fiddling around I found an error
Programmer is not responding.
When I try to reset the board or just reconnect it to my PC it might work.
Here's the sketch-
int RightMotorForward = 12;
int RightMotorReverse = 13;
void setup()
{
pinMode(RightMotorForward, OUTPUT);
pinMode(RightMotorReverse, OUTPUT);
}
void loop()
{
digitalWrite(RightMotorForward, HIGH);
delay(10000);
digitalWrite(RightMotorForward,LOW);
delay(1000);
}
Can anybody point out where I am going wrong? I am using Arduino UNO. Is this just some problem in my code?