       Serial.print(m_id);
       Serial.print('=');
       Serial.println(state);
-    }
-    m_lastPinState = state;
+      m_lastPinState = state;
+    }
   }
 }
 

				c = -1;
			}
			if (c>0 && c!='\r' && c!='\n' && i<16) {
                                i++;
				lcd.write(c);
                                //Serial.print(c,HEX);
			}
		}
                for (;i<16;i++) {
                  lcd.write(' ');
                }
//        Serial.println("endLCD");
	}
}

  updatePins();
  checkSerialInput();
  updateLeds();
  delay(100);
}

