Getting number of characters int

this is shown below
each element of name [] has an address to a char array (e.g. tom)

you're using Strings instead of c-string (char arrays) and just concatenating strings together menuVariables[lcdMenu - 1] + menuUnits[lcdMenu - 1] instead of using sprintf() to format a string with specified sub-field lengths. see the examples above

This is the one i'm going for. I don't see any problems to implement this in my sketch/project.:

#include <LiquidCrystal.h>

LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

char *menuText[] = { "MinLevel", "MaxLevel", "FillStart", "FillStop", "Alarmtime" };
int menuVariables[] = { 180, 30, 170, 150, 60 };
char *menuUnits[]= { "cm", "cm", "cm", "cm", "min" };

char buf[16]; // Change this value accordingly (max string length + 1)

void setup() {
  //Serial.begin(115200);	// Debugging only

  //lcd.init();
  //lcd.backlight();
  //lcd.clear();

  lcd.setCursor(0, 0);
  lcd.print(" - TEST CODE - ");
  }

void printValue(int lcdMenu) {
  sprintf(buf, "%-10s%3d%-3s", menuText[lcdMenu-1],  menuVariables[lcdMenu-1], menuUnits[lcdMenu-1]);
  //lcd.setCursor(16 - strlen(buf), 1);
  lcd.setCursor(0, 0);
  lcd.print(buf);
}

void loop() 
{
  for(int i=1; i<=5; ++i) {
  	printValue(i);
  	delay(1000);
  }
  delay(2000);
}

Thx eveybody for helping me out. Using genuine type char and the 'artificial' string back and forth is still a little bit clouded for. The memory readout (dump?) lifted that mist a little bit up (thank god i'm already a bit 'digitalised').
I the age of the dyno's (26 years ago) i made a (for me) complicated graduation project with; @ the heart; a PIC microcontroller (IDE=MPlab, laguage=pic assembler) and that gave me so much headaches i never touched that stuff again.

It seems that the #include <LiquidCrystal_I2C.h> is not the standard Arduino IDE library. The name is different and the standard one also requiers the wire.h library.
Is yours one with integrated I²C communication protocol?
thx! (i want some extra I/O 's so i'll use the I²C lcd display instead of the 8bit version)

Now another problem....pfff it doesn't seem to stop. Can't make anything that works without have to search for hours for a solution.
I adapted your code a little bit to this so it should work with the standard I²C 16x2 LCD display library:

#include <LCD-I2C.h>
#include <Wire.h>

LCD_I2C lcd(0x27, 16, 2);

int menuVariables[5] = { 180, 30, 170, 150, 60 };
const char *menuUnits[] = { "cm", "cm", "cm", "cm", "min" };

char buf[10]; // Change this value accordingly (max string length + 1)

void setup()
{
  //Serial.begin(115200);	// Debugging only
  Wire.begin();
  lcd.begin(&Wire);
  lcd.backlight();
  lcd.clear();

  lcd.setCursor(0, 0);
  lcd.print(" - TEST CODE - ");
  
}

//void printValue(int lcdMenu) {
 //sprintf(buf, "%3d%s", menuVariables[lcdMenu-1], menuUnits[lcdMenu-1]);
 //lcd.setCursor(16 - strlen(buf), 1);
 //lcd.print(buf);
//}

void loop() {
  //for(int i=1; i<=5; ++i) {
  	//printValue(i);
  	//delay(1000);
  //}
  //delay(2000);
}

a I²C LCD example in the arduino IDE:

#include <LCD-I2C.h>
#include <Wire.h>

LCD_I2C lcd(0x27, 16, 2); // Default address of most PCF8574 modules, change according

void setup() {
    Wire.begin();
    lcd.begin(&Wire);
    lcd.display();
    lcd.backlight();
}

void loop()
{
    lcd.print("     Hello"); // You can make spaces using well... spaces
    lcd.setCursor(5, 1); // Or setting the cursor in the desired position.
    lcd.print("World!");
    delay(500);

    // Flashing the backlight
    for (int i = 0; i < 5; ++i)
    {
        lcd.backlight();
        delay(50);
        lcd.backlightOff();
        delay(50);
    }

    lcd.backlight();
    lcd.clear();
    delay(500);
}

So my adaption is very similar but the diplay doesn't show any characters with the backlight lit up.

There is not "standard" i2c library and LCD-I2C.h is not the one referenced in the arduino library documentation. A newer library that seems to be popular is the hd44780.h library. It can auto detect the address of the display.

I'm calling it 'standard' because it seemd to be the only one thats was already in the arduino IDE. I'v found out (and used) a sketch to find the LCD I²C address. But now i've also found the one you are reffering to; already in the IDE (thank for the tip!). I'll try this one asap.

...pfff and now i see it is actually "an expandable library package that can communicate with many different types of LCD hardware and interfaces."
So i need a extra lib that i need to search for.... see my point? This is never ending and i'm not going that road. I'll keep on searching for an other lib. Open source is a blessing but also a pain in the *ss.

No you don't.

The hd44780.h library is expandable to meet future needs with different display hardware, but it works out of the box with a standard I2C interface to an LCD and comes with multiple examples

Not standard? You can find it using the IDE "library manager", just type "LiquidCrystal_I2C" in the search box. Please note unfortunately there are some libraries with the same exact name, the most commonly used (and working) is the one from "Frank de Brabander":


By the way, IMO the best library is the one called "LiquidCrystal_PCF8574":

PS: yes Wire.h is used...

hallelujah! i used the name of lib (copy/paste); in the example from gcjr; in the search field to find the right lib...and i found it and it works (the Frank de Brabander lib; without the use of wire.h)!
Now i'm going to tackle the EEPROM. Thx gcjr, docdoc and UKHeliBob!
I have marked the solution for the initial problem.
The next problems (i'm shure they'll come!) are going to get posted in a new topic.
thx guy's!!!