void setup() {
pinMode(12, OUTPUT); //rpwm
pinMode(13, OUTPUT); //Lpwm
pinMode(22, OUTPUT); //L_en
pinMode(23, OUTPUT); //R_en
digitalWrite(22, HIGH); //setting L_en high
digitalWrite(23, HIGH); //setting R_en high
}
void loop() {
digitalWrite(12,HIGH);//setting rpwm high
digitalWrite(13,LOW);//setting Lpwm LOW
delay(2000);
digitalWrite(12,LOW); //setting rpwm low
delay(2000);
digitalWrite(13,HIGH); //setting Lpwm high
delay(2000);
}
I am using the above mentioned code to try and move the motor in both the directions.
I am not able to figure out how the driver works actually.
this is the driver I am using:https://robokits.co.in/motor-drives-drivers/bts7960-high-power-driver-module-43a?cPath=73_110&
what are the changes I need to make to make the motor move in both forwards and reverse direction?