       }
     case 'G' : {
         // run gradient pulse between a and b with appropriate timestep; "G#000000:#123456:time" input
-        if (input[9]=='#') {
-          char hex1[7], hex2[7];
-          char timev[7]; //well our buffer is 7 chars now.
+        if (input[1]=='#' && input[9]=='#') {
+          char hex1[8], hex2[8];
+          char timev[8]; //well our buffer is 7 chars now.
           for (int x=0; x<7; x++) {
             hex1[x]=input[x+1];
             hex2[x]=input[x+9];
             timev[x]=input[x+16];
           }
           int col1[4],col2[4];
-          int *col1p[4] = {&col1[0],&col1[1],&col1[2]};
-          int *col2p[4] = {&col2[0],&col2[1],&col2[2]};
+          int *col1p[4] = {&col1[0],&col1[1],&col1[2],0};
+          int *col2p[4] = {&col2[0],&col2[1],&col2[2],0};
           decodeHex(hex1,col1p);
           decodeHex(hex2,col2p);
 

        decodeHex(colorInput,rgb);
        setOutput(rgb);

        if (DEBUGGING_MODE) {
          Serial.println("Color set.  Results:");
        }
        // echo current colors:
        Serial.print('#');
        if (red<=16) {Serial.print('0');}
        Serial.print(red, HEX);
        if (green<=16) {Serial.print('0');}
        Serial.print(green, HEX);
        if (blue<=16) {Serial.print('0');}
        Serial.println(blue, HEX);

        if (DEBUGGING_MODE) {
          Serial.print("red: ");
          Serial.println(red, DEC);
          Serial.print("green: ");

 */

#include <stdarg.h>


static boolean SINGLE_LED = true; // real LED driver or test rig?
static int R_PIN = 6;   // pins for
static int G_PIN = 5;   // directly driven
static int B_PIN = 4;   // test setup
static int GND = 7;     // ( <-so we don't have to split cables)

#include "RGBdriver.h"
#define CLK 2 //pin definitions for Grove driver        
#define DIO 3
RGBdriver Driver(CLK,DIO);

static int BAUDRATE = 19200;
boolean DEBUG = false; // toggle serial debug text
int TIMEOUT = 300;  //timeout in seconds before beginning default pattern
int red,green,blue;
int* rgb[4] = {&red, &green, &blue, 0};
// In use, & means "address of"; * means "follow this address".
// This is an array of pointers (which lead to our RGB vars).  Write
// to it with *rgb[x], which means "follow the address at rgb[x]" which
