   }        
 
   // send voltage and current
-  if (time.elapsed(1000)) {
+  if (statustime.elapsed(1000)) {
     vout.send(vout.read());
     iout.send(average);
     Serial.print("time:");

  }

  //to reduce AMP spikes, smooth large power adjustments out
  if (time.elapsed (100)) {
    if (p<c_motorp) c_motorp--;
    if (p>c_motorp) c_motorp++;
    if (v<c_motorv) c_motorv--;

Device iout("iout", 3, iout.analog, iout.in);
Device light("light", 5, light.analog, light.out);
Timer time;
Timer statustime;
Timer controltime;

Servo tilt;
// IMPORTANT!
