Forward rolling Code

 #include <DRV8833.h> 

DRV8833 driver = DRV8833(); 


int motorA1 = 5 ;

int motorA2 = 6;

int motorB1 = 11;

int motorB2 = 3;


int Pot = 0;

int valor; 


void setup() { 

  Serial.begin(9600); 

  driver.attachMotorA(motorA1, motorA2);

  driver.attachMotorB(motorB1, motorB2); 

}


void loop() {

  

  valor= analogRead(Pot)/4; 

  driver.motorAForward(110); 

  driver.motorBForward(90);

  Serial.println(valor);

  }


Comentarios

Entradas populares de este blog

Traffic light algortihm