turring off part of a code with a switch?


can turn off (and on) parts of code switch?
not trigger event, enable event triggered.

basically want "comment out" few lines push of button bring them in loop push.

for example, original state of line:
code: [select]
 if(sample4.uniquepress()){
   midi.sendnoteon(69,127,1);  
   delay (150);
   midi.sendnoteoff(69,0,1);  
     }

then push of button have turn act this:
code: [select]
//  if(sample4.uniquepress()){
//    midi.sendnoteon(69,127,1);  
//    delay (150);
//    midi.sendnoteoff(69,0,1);  
//      }

then on next push have revert original state.


i know commenting out not way achieve it, how want behave.

there must way, haven't been able head around how make happen.

just count occurences of event want, , trigger on, say, numbers.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > turring off part of a code with a switch?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums