   return value;
 }
 
+char* safeLCDString(const char* src) {
+  return safeLCDString(16, src);
+}
+
+char* safeLCDString(const int length, const char* src) {
+  char result[length];
+  for(int i = 0; i < length ; i++) {
+    result[i] = 'd';
+  }
+  //strncpy(result, src, sizeof(src));
+  for(int i = 0; i < length ; i++) {
+    if (result[i] == '\0') {
+      result[i] = ' ';
+    }
+  }
+  result[length - 1] = '\0';
+  Serial.println(result);
+  return result;
+}
+
 void printToSerial(const float value, const unsigned long now, String& weightName) {
   if ((lastPrint + DEFAULT_WEIGHT_PRINT_TIME) < now || ((useFastWeight && (last + DEFAULT_WEIGHT_TIME_FAST) < now))) {
     Serial.print(weightName);

    lcd.print(weight + kilo);
  } else {
    if (WEIGHT_SENSORS == 1) {
      lcd.print(weightName + weight + kilo);
      lcd.setCursor(0, 1);
      String beers = String("Beers:");
      char numberOfBeers[4];


#define BUTTON_PIN   0

// initialize the library with the numbers of the interface pins
//LiquidCrystal lcd(13, 12, 8, 9, 10, 11); //PROD
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); //DEBUG
HX711 scales[] = {
  HX711 (A1, A2), HX711 (A3, A4)}; //A1 = ANALOG1 = DT // A2=SCK
int eepromAddress[WEIGHT_SENSORS] = {0};

unsigned long last = 0;
unsigned long lastPrint = 0;
const String kilo = "kg";

// KEY VARIABLES
int lcd_key = btnNONE;
