I am using the Arduino Uno in a science project, and I can’t figure out the first error I get by clicking the verify button. When I click the verify button I get a string of errors, and I can’t solve the small ones until I get the first one done.
Here’s the error (Only the first one):
Arduino_Random_Movement.ino: In function 'void pulsewait':
Arduino_Random_Movement:49: error: expected primary-expression
before 'a'
:~
…And here’s the code (Only the problem section)
void pulsewait() {
long duration, inches;
HIGH ;13;
delayMicroseconds(2);
LOW ;13;
duration = pulseIn(12, HIGH);
inches = microsecondsToInches(duration);
long microsecondsToInches(long microseconds);
if (inches < 8)
{
halt();
HIGH ;3;
delay ;1500;
LOW ;3;
word a = 0;
}
delay ;1;
word a; - 1;
if (word a > 0)
{
pulsewait();
}
}
The problem is on this line:
if (word a > 0)
If you can help, please do! Thanks in advance!
(And if it’s something “obvious”, sorry, I’m a preteen noob!)