MD1.3 2A Motor Driver and Code Not Working
I have set everything up according to the DFRobot Forum. The only difference being is I am using an Arduino UNO, Arduino IDE and a 2200 mah 11.1V LiPo battery for the motor supply. I am reading a voltage of around 25 volts on the driver terminals, which should be sufficient, but when I upload the code to my Arduino UNO, the motors are not turning on. The driver says I have power to the board, but the motor LEDs are not lighting up and I have no power to the motor terminals. Here is my setup and code:
int E1 = 6;
int E2 = 5;
int M1 = 7;
int M2 = 4;
void setup(){
pinMode(M1, OUTPUT);
pinMode(M2, OUTPUT);
}
void loop(){
int value;
for(value=0;value≤255;value+=5){
digitalWrite(M1, HIGH);
digitalWrite(M2, HIGH);
analogWrite(E1, value);
analogWrite(E2, value);
delay(30);
}
Any help on why the motors aren't receiving any power would be greatly appreciated!