So I'm trying to make a variable string that will be lcd.print():ed , the print function is running all the time in the loop and the string is changed depending on the case called, I got it working just fine using String but "everyone" is going nuts about using String instead of string, so I decided to "fix it", also to point out the name for string in the Reference is String and that should be fixed if it is actually with a lower case.
In function 'void loop()':
error: incompatible types in assignment of 'const char [10]' to 'char [16]'
lineOne = "Measuring";
The string length won't be larger than 16 characters for sure, since I'm using an 8x2 LCD.
So what am I doing wrong, how can I define the max string length?
I don't want code that changes the max length dynamically, I want it constant, I don't really care for it using less memory, I have seen the posts that add a bunch of code the make the length dynamic bla bla bla, I want to keep it simple.
"strings" are annoying to deal with, because you can't use "normal" C operators like "=" or "+" with them; they are essentially (exactly) arrays, and you can't say lineOne = "Measuring"; any more than you could say "myarray = {1,2,3,4,5};"
Instead, you have to use functions. "strcpy" is efficient to use for simple cases, "sprintf" is something you can look at to do more complicated formatting.