  * Website: www.christianbenjaminries.de
  * GitHub: https://github.com/cbries
  * License: MIT, see https://github.com/cbries
+ *
+ * 2015-04-06 Christian Benjamin Ries
+ *   - added command for switching between default modes
+ *      'mA'  run in grid mode which allows setting of individual led values
+ *      'mB'  randmom leds
+ *      'mC'  color wave
+ *      'mD'  rainbow
+ *      'mE'  show Super Mario's Goomba :)
  *
  * 2015-02-27 Christian Benjamin Ries
  *   - correct rgb mapping of serial received data

      Serial.println(" OK ");
    }
  
    if(sbuf[0] == 'b' && index == 5)
    {
      String s("");

  ptrBrightnessUSING = ptrBrightness;
}

volatile byte RUNMODE = 'C';

void loop(void) 
{
  checkSerial();
  switch(RUNMODE)
  {
    case 'A': runGrid(); break;
    case 'B': for(unsigned int i=0; i < 100; ++i) { random_leds(); copyBuffer(); delayMicroseconds(10); } break;
    case 'C': color_wave(18); copyBuffer(); delayMicroseconds(25); break;
    case 'D': rainbow(); delayMicroseconds(25); break;
    case 'E': ShowGoomba(); delayMicroseconds(25); break;
  }
}

inline void set_led_red(byte x, byte y, byte red)     { *(ptrBrightness + RED(x, y)) = red; }
