BTS7960B Motor Driver Not Working!


hi, have bts7960b motor driver connected arduino , not working @ have tried searching online code might make work nothing. code using.

// arduino code h_bridge

int lpwm = 9; // h-bridge leg 1 ->lpwm
int enl = 8; // h-bridge enable pin 1 -> l_en


int rpwm = 6; // h-bridge leg 2 ->rpwm
int enr = 9; // h-bridge enable pin 2 -> r_en

void setup()
{
  serial.begin (9600);
  pinmode(lpwm, output);
  pinmode(rpwm, output);
  pinmode(enl, output);
  pinmode(enr, output);

  digitalwrite(enl, high);
  digitalwrite(enr, high);
}

void loop()
{
  analogwrite(rpwm,100); //pwm value
  digitalwrite(lpwm, low);

}



we connected 9.6v vcc , ground. please if can school project. want see right motor driver isnt defective code make 1 of motors move perfect.



Arduino Forum > Using Arduino > Motors, Mechanics, and Power (Moderator: fabioc84) > BTS7960B Motor Driver Not Working!


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62