Conexión puente H L293D
int int1=2;
int int2=3;
void setup() {
pinMode(in1,OUTPUT);
pinMode(in2,OUTPUT);
}
void loop() {
//ADELANTE
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW );
delay(3000);
//ATRAS
digitalWrite(in1,LOW );
digitalWrite(in2,HIGH );
delay(3000);
//DETENER
digitalWrite(in1,LOW );
digitalWrite(in2,LOW );
delay(3000);}
int int2=3;
void setup() {
pinMode(in1,OUTPUT);
pinMode(in2,OUTPUT);
}
void loop() {
//ADELANTE
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW );
delay(3000);
//ATRAS
digitalWrite(in1,LOW );
digitalWrite(in2,HIGH );
delay(3000);
//DETENER
digitalWrite(in1,LOW );
digitalWrite(in2,LOW );
delay(3000);}
Comentarios
Publicar un comentario