const int dirPin = 8;
const int stepPin = 9;
const int steps = 200;
int microPausa = 1000;
void setup() {
pinMode(dirPin, OUTPUT);
pinMode(stepPin, OUTPUT);
}
void loop() {
digitalWrite(dirPin, HIGH); // Establezco una dirección
for (int i = 0; i < steps; steps ; i++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(microPausa);
digitalWrite(stepPin, LOW);
delayMicroseconds(microPausa);
}
delay(1000);
digitalWrite(dirPin, LOW); // Cambio la dirección
for (int i = 0; i < steps; steps ; i++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(microPausa);
digitalWrite(stepPin, LOW);
delayMicroseconds(microPausa);
}
delay(1000);
}
Compilation error: expected ')' before ';' token