void loop(){
if (1stsequenceFlag == 1){
// perform 2nd sequence all the time after 1st sequence runs 1 time)
}
if (1stsequenceFlag == 0){
// perform 1st sequence
1stsequenceFlag = 1;
}
//do other loop stuff
} // end loop
could do similar with switch:case statements
void loopI){
switch (sequenceNumber){
case 0:
// do 1 time code
sequenceNumber = 1;
break;
case 1:
// do the repeating code
break;
}
// do other code in loop
}
Arrch:
Just put the new code after the first set of code.
I did that, but the timing gets all messed up. It works, just not the way I want it to. Besides, When I make the thing 20 led's are going to light up one after the other, and then a buzzer beeps.
Thanks for the input.
if (1stsequenceFlag == 1){
// perform 2nd sequence all the time after 1st sequence runs 1 time)
}
if (1stsequenceFlag == 0){
// perform 1st sequence
1stsequenceFlag = 1;
}
//do other loop stuff
} // end loop
could do similar with switch:case statements
void loopI){
switch (sequenceNumber){
case 0:
// do 1 time code
sequenceNumber = 1;
break;
case 1:
// do the repeating code
break;
}
// do other code in loop
}
if (1stsequenceFlag == 1){
// perform 2nd sequence all the time after 1st sequence runs 1 time)
}
if (1stsequenceFlag == 0){
// perform 1st sequence
1stsequenceFlag = 1;
}
//do other loop stuff
} // end loop
could do similar with switch:case statements
void loopI){
switch (sequenceNumber){
case 0:
// do 1 time code
sequenceNumber = 1;
break;
case 1:
// do the repeating code
break;
}
// do other code in loop
}
Ok. Now i'm going to bug you again, How would I implement that string of code? Sorry, i'm just learning c++ and this is all new too me.