//++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++
void ADELANTE(){
PORTD=B10100000;
}
void DERECHA(){
PORTD=B10000000;
}
void IZQUIERDA(){
PORTD=B00100000;
}
void DETENER(){
PORTD=B00000000;
}
void REVERSA(){
PORTD=B01010000;
}
void setup() {
// put your setup code here, to run once:
//PINES 7,6,5,4,3,2,1,0 = PORTD
//ENTRADA=0 Y SALIDA=1
DDRD=B11110011;
}
void loop() {
// put your main code here, to run repeatedly:
ADELANTE();
delay(2000);
DERECHA();
delay(500);
IZQUIERDA();
delay(500);
DETENER();
delay(3000);
REVERSA();
delay(1000);
}
//++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++
Les deseo mucho éxito
y sigamos programando!!!
No hay comentarios.:
Publicar un comentario