KENNY TAX SERVICES: PAY WITH YOUR REFUND, GET YOUR REFUND DIRECT DEPOSIT, FREE ESTIMATES, NO APPOINTMENTS NEEDED. OTHERS SERVICES: CELL PHONES / VENTAS DE CELULARES, PAY BILLS / PAGO DE BILLS, SEND MONEY / ENVIO DE DINERO, SHIPPING / ENVIO DE CAJAS. CALL OR VISIT US: 510 ARMORY ST. SPRINGFIELD, MA 01104 TELL. (413) 214-6136 FAX (413) 214-6133 EMAIL: KENNYTRAVEL12@YAHOO.COM

RIGHT WHEEL ROTATION

//www.elegoo.com
//2016.09.23

/*In1 connected to the 9 pin,
In2 connected to the 8 pin, ENA pin 10,*/
int ENA=5;
int IN1=6;
int IN2=7;
void setup()
{
pinMode(IN1,OUTPUT);
pinMode(IN2,OUTPUT);
pinMode(ENA,OUTPUT);
digitalWrite(ENA,HIGH);
}
void loop()
{
digitalWrite(IN1,HIGH);
digitalWrite(IN2,LOW); //Right wheel forward
delay(500);
digitalWrite(IN1,LOW);
digitalWrite(IN2,LOW); //Right wheel stop
delay(500);
digitalWrite(IN1,LOW);
digitalWrite(IN2,HIGH); //Right wheel back
delay(500);
digitalWrite(IN1,LOW);
digitalWrite(IN2,LOW); //Right wheel stop
delay(500);
}

Valoraciones

No hay valoraciones aún.

Sé el primero en valorar “RIGHT WHEEL ROTATION”