Sparkfun motor driver TB6612FNG

Поділитися
Вставка
  • Опубліковано 21 жов 2024

КОМЕНТАРІ •

  • @mattyrjackson4261
    @mattyrjackson4261 4 роки тому

    Love it, very helpful tutorial. Do you know if this board protects the Vcc voltage?

  • @kevininforma4946
    @kevininforma4946 3 роки тому

    buen video,cuanto voltaje le esta dando al driver?

  • @croydon21H
    @croydon21H 4 роки тому

    2x 3.7v + laptop powering UNO. Did you make a robot car...or just spin 2 motors from laptop?

  • @pranshupatel8161
    @pranshupatel8161 5 років тому

    Sir i have make a self balancing robot i am uploding program in arduino port and arduino type is also roght sketch complishinh sucessfull but when i uplode the program there are an error avrud contant mismatch
    Sorry for late replay i open youtube just now

  • @arduinohowto4241
    @arduinohowto4241  6 років тому +3

    const int AI2 = 4; //motor A
    const int AI1 = 5;
    const int PWM_A = 3;
    const int BI2 = 9; // motor B
    const int BI1 = 8;
    const int PWM_B = 10;

    void setup()
    {
    //set all pins as output
    pinMode(AI2, OUTPUT);
    pinMode(AI1, OUTPUT);
    pinMode(PWM_A, OUTPUT);
    pinMode(BI2, OUTPUT);
    pinMode(BI1, OUTPUT);
    pinMode(PWM_B, OUTPUT);
    }
    void loop()
    {
    digitalWrite(AI2, HIGH);
    digitalWrite(AI1, LOW);
    analogWrite(PWM_A, 255); //sets speed, motor A
    digitalWrite(BI2, HIGH);
    digitalWrite(BI1, LOW);
    analogWrite(PWM_B, 255); //sets speed, motor B
    //wait 1 second
    delay(1000);

    digitalWrite(AI2, LOW);
    digitalWrite(AI1, LOW);
    analogWrite(PWM_A, 0);
    digitalWrite(BI2, LOW);
    digitalWrite(BI1, LOW);
    analogWrite(PWM_B, 0);
    //wait 1 second
    delay(1000);

    //change direction to reverse by flipping the states
    //of the direction pins from their forward state
    digitalWrite(AI2, LOW);
    digitalWrite(AI1, HIGH);
    analogWrite(PWM_A, 255);
    digitalWrite(BI2, LOW);
    digitalWrite(BI1, HIGH);
    analogWrite(PWM_B, 255);

    delay(1000);
    //Brake again
    digitalWrite(AI2, LOW);
    digitalWrite(AI1, LOW);
    analogWrite(PWM_A, 0);
    digitalWrite(BI2, LOW);
    digitalWrite(BI1, LOW);
    analogWrite(PWM_B, 0);

    delay(1000);
    }

  • @pranshupatel8161
    @pranshupatel8161 5 років тому

    hello sir i am your new subscriber i have an problem verification error, content mis match

  • @luizintini9396
    @luizintini9396 3 місяці тому

    This music makes the video unwatchable.

  • @CafeBikeGirl
    @CafeBikeGirl 3 роки тому

    For those who are interested I have a basic model of this breakout board on GrabCad: grabcad.com/library/sparkfun-motor-driver-dual-tb6612fng-1a-1