         Serial.print(col2[i]);
         Serial.print(' '); 
       }
+      Serial.print("delayPerTick = ");
+      Serial.println(delayPerTick);
+      Serial.print("perPerTick = ");
+      Serial.println(perPerTick);
       Serial.println();
     }
     
-    for (float per = 0; per+=perPerTick; per<=1.0) {
-      Serial.println(per);
+    for (float per = 0; per<1.0; per+=perPerTick) {
+      Serial.print(per);
+      Serial.println("/1");
       gradientValue(col1,col2,per,rgb);
       setOutput(rgb);
       delay(delayPerTick);

            hex2[x]=input[x+9];
            timev[x]=input[x+16];
          }
          int col1[4],col2[4];
          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);
          float timeVal = atoi(timev); //use strtol or sscanf instead

          gradientPulse(col1,col2,timeVal);
          
          if (DEBUG) {
            Serial.println(hex1);
            Serial.println(hex2);
            Serial.println(timev); }
        }
        break;
      }

      // begin debugging char commands go here
      

    }

    if (DEBUG) {

  }


  void gradientPulse (int col1[], int col2[], float timev) { // timev is now in seconds   
    // in this initial version, gradient pulses are going to be locking.
    // This is obviously a problem - add an interrupt when you have time.

    float delayPerTick = (float) timev*1000/numdivs;
    float   perPerTick = (float) 1/numdivs;

//    Serial.println(timev);
//    Serial.println(numdivs);
//    Serial.println(timev/numdivs);

    if (DEBUG) {
      Serial.println("---gradientPulse---");
