 #if MODE_JIRO
 #define HEAVY_THRES LONG_MAX
 #endif
+
+unsigned long int lastTime;
 
 int channelSample [CHANNELS];
 int lastChannelSample [CHANNELS];

  }

#if MODE_DEBUG
// Damn Arduino plotter, the Y axis scale changes much 
// too frequently! Use these 5000 and 0 values to "lock" 
// the plotter.
  Serial.print (5000);
  Serial.print ("\t");
  Serial.print (0);
  Serial.print ("\t");
#if MODE_DEBUG_SHOW_TIME
  Serial.print (sampleLastTime);
  Serial.print ('\t');
  Serial.print (calcLastTime);
#endif
  Serial.println ("");
#endif

}

    power [i] -= tempInt * tempInt;
    tempInt = sampleCache [i].get ();
    power [i] += tempInt * tempInt;
    if (power [i] < LIGHT_THRES) {
      power [i] = 0;
    }
    
    powerCache [i].put (power [i]);
    lastChannelSample [i] = channelSample [i];
    if (powerCache [i].get (1) == 0) {
      triggered [i] = false;
    }

    if (!triggered [i]) {
      for (short int j = 0; j < POWER_CACHE_LENGTH - 1; j++) {
        if (powerCache [i].get (j - 1) >= powerCache [i].get (j)) {
          break;
        } else if (powerCache [i].get (1) >= HEAVY_THRES) {
          triggered [i] = true;
          Keyboard.print (heavyKeys [i]);
        } else if (powerCache [i].get (1) >= LIGHT_THRES) {
          triggered [i] = true;
          Keyboard.print (lightKeys [i]);
        }
      }
    }
    
#if MODE_DEBUGjj
    Serial.print (power [i]);
    Serial.print ("\t");
#endif
