yes, it is smoother if i just print the value. If I move Marking depth and Microns to setup I cannot display other messages on the lcd...
If I remember correctly... you can write the "Marking Depth" and "Microns" on the setup function and then only write the step values like you did before.
When you write a different message on the LCD, you then need to re-write the "Marking Depth" and "Microns" in the LCD. You can create a bool variable that, if set, will write those messages in the LCD. Got it?
boolean refresh;
unsigned int time_to_refresh;
setup() {
write_LCD ("Marking Depth" and "Microns");
refresh = 0;
time_to_refresh = 0;
}
loop() {
position_after("Marking Depth" and "Microns" );
write_LCD (marking depth);
write_LCD (microns);
if (something_happened) {
write_LCD ("hey... something's happened!!!!");
time_to_refresh = 50000;
refresh =1;
}
if (refresh ==1 && time_to_refresh > 0) {
time_to_refresh--;
}
else {
write_LCD ("Marking Depth" and "Microns");
refresh = 0;
time_to_refresh = 0;
}
}
I know that the code is not perfect... but it's something like this you'd need to do. :\ Or get a function called set_LCD () that will write all the constant string in the LCD and call that when you clear the message. I can give you a few more pointers on this, but I'd need to know what the system is doing and what are the inputs and outputs.