else, without a previous if?  :(

Bah, sorry to be asking for help so often... but... :slight_smile:

I can't seem to group the statement so it thinks it's the same thing? : (

while (totalDelay < randNumber) {
delay (10);
bumpSensorState= digitalRead (bumpSensor);
if (bumpSensorState== LOW);
break ;
} else (totalDelay +=10) {
Serial.println(totalDelay); }

Either way, thanks for your time, and I promise I'll put work back into this forum once I know whatthehell I'm doing : )

while (totalDelay < randNumber) {
  delay (10);
  bumpSensorState= digitalRead (bumpSensor);
  if (bumpSensorState== LOW){ //not ;
    break ;
  } else if (totalDelay +=10) {
    Serial.println(totalDelay); 
  }
}

Maybe
[edit]This does not do as you wish, probably. (totalDelay += 10) will almost always evaluate to true[/edit]

if (bumpSensorState== LOW);

See that red semicolon? It terminates the if statement. I'm fairly certain that is not what you intended...

-j

ye-es! got it... kinda, good enough :slight_smile:

Thanks guys!

-J