   String inp = readCommand();
   if (inp == "") {
   } else if (inp == "dump") {
-    for (int i = 0; i < numSen; i++) {
+    for (int i = 0; i < count(updateTimes); i++) {
       String com = String(i) + " " + String(types[i]) + " " + String(updateTimes[i]) + " " + String(pins[i]);
       sendCommand("dump_pin", com);
     }

}

void setup() {
  Serial.begin(57600); // set the baud rate
  for (int i = 0; i < numSen; i++) {
    pinMode(pins[i], INPUT);
    update(types[i],pins[i]);
  }  
}

void loop() {

void update(int type, int pin) {
  String c, v;
  switch (type) {
    case BMP180T:
        double T;
        c = "BMP180T";
        if (bmp180Temperature(T)) v = String(T);
        else v = c + " Error";
        break;
    case BMP180P:
        double P;
        c = "BMP180P";
        if (bmp180Pressure(P)) v = String(P);
        else v = c + " Error";
        break;
  }
  sendCommand(c, v);
}

void updateAll() {
  for (int i = 0; i < count(updateTimes); i++) {
    unsigned long actTime = millis();
    if (actTime - lastUpdate[i]  > updateTimes[i]) {
      update(types[i], pins[i]);
