Skip to main content

I've been working on another Arduino project and as usual I have a problem. When I try to upload the program I get the message "Expected " ; " before Microseconds. I have no idea what the problem is. Here is the code:

//Program to use A4988 controller module
// with arduino uno or nano
const int stepPin = 3;
const int dirPin = 4;
const int STEPS_PER_REV = 200;

void setup() {

pinMode (stepPin, OUTPUT);
pinMode (dirPin, OUTPUT);
}
void loop() {
digitalWrite(dirPin, HIGH);
for (int x = 0; x < (STEPS_PER_REV); x++) {
digitalWrite(stepPin, HIGH);
delay Microseconds(2000);
digitalWrite (stepPin, LOW);
delay Microseconds(2000);
}
delay (1000);
digitalWrite(dirPin, LOW);
for (int x = 0; x < (STEPS_PER_REV ); x++) {
digitalWrite(stepPin, HIGH);
delay Microseconds(1000);
digitalWrite(stepPin, LOW);
delay Microseconds(1000);
}
delay (1000);
}

The problem happens at the last delay Microseconds line.

Any ideas what the problem is?

Thanks

Jay

Original Post

Replies sorted oldest to newest

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×