cant get the A motors to work
so im trying to test the tb6612fng module following this guide but for some reason no motor conencted to A works, tried both the modules and different motors that does work but it only A motor that doesnt work https://www.instructables.com/Driving-Small-Motors-With-the-TB6612FNG/
Instructables
Driving Small Motors With the TB6612FNG
Driving Small Motors With the TB6612FNG: The TB6612FNG is a dual motor driver IC from Toshiba. There are plenty of breakout boards out there for it and it's one of the most popular choices to drive small motors.
There are plenty of of online resources on getting started witht he TB6612FNG …

3 Replies
it was a code issue
int STBY = 10; //BEKLEME PINI
//Motor A
int PWMA = 3; //A MOTOR HIZ PINI
int AIN1 = 9; //YON1
int AIN2 = 8; //YON2
//Motor B
int PWMB = 5; //B MOTOR HIZ PINI
int BIN1 = 11; //YON1
int BIN2 = 12; //YON2
void setup(){
// PIN AYARLARI
pinMode(STBY, OUTPUT);
pinMode(PWMA, OUTPUT);
pinMode(AIN1, OUTPUT);
pinMode(AIN2, OUTPUT);
pinMode(PWMB, OUTPUT);
pinMode(BIN1, OUTPUT);
pinMode(BIN2, OUTPUT);
}
void loop(){
move(1, 255, 1); //MOTOR 1 TAM HIZDA
move(2, 255, 1); //MOTOR 2 TAM HIZDA
delay(1000); //1 saniye bekle
stop(); //motor durdur
delay(250); //250 ms bekle
move(1, 128, 0); //motor 1, yarım hıza al
move(2, 128, 0); //motor 2, yarım hıza al
delay(1000);
stop();
delay(250);
}
void move(int motor, int speed, int direction){
digitalWrite(STBY, HIGH); //MOTORLAR AKTIF
//istenen yön durumuna göre yön pinlerinin polarizesini değiştir
boolean inPin1 = LOW;
boolean inPin2 = HIGH;
if(direction == 1){
inPin1 = HIGH;
inPin2 = LOW;
}
if(motor == 1){
digitalWrite(AIN1, inPin1);
digitalWrite(AIN2, inPin2);
analogWrite(PWMA, speed);
}else{
digitalWrite(BIN1, inPin1);
digitalWrite(BIN2, inPin2);
analogWrite(PWMB, speed);
}
}
void stop(){
//MOTORLARI DURDUR
digitalWrite(STBY, LOW);
}
@Mercury Woman
Tag Sent
See <#451158319361556491>
Arduino Bot • Submit bugs on GitHub!
glad you got it going...