Sorry this took so long, you might have gotten past some of it.
Don't know where to begin?
See where you have the comment Time Shit? Below that over and over you have the same basic lines of code with very little changed. You begin by seeing what is the same or almost the same and thinking up how to generalize it.
Elements (chars, ints, structs, unions) in an array all address through indexes. I can have a dozen separate variables all the same type and a dozen blocks of code to do the same basic thing to each one by name, or,
I can put them all in an array and loop the bunch through one block of code that takes care of them all as a matter of rule. I can have exceptions even, that's what if() statements are for. But the better my solution, the fewer of that kind of thing it will need.
If it's any consolation, I have fixed bug-ridden code written by a PhD in the early 80's who didn't know that. Maybe they teach it since then but not everywhere. In 88 and 89 I saw four Drexel U CompSci Masters that weren't a whole lot brighter when it came to code. They had this attitude that newer computers would cover bad habits. It frankly amazed me that people who could get through calculus didn't generalize their code.
Anyway, blocks like this:
// setting cursor for printing on second line of display...
lcd.gotoLine(2);
Serial.print(" ");
delay(10);
lcd.gotoLine(2);
Serial.print("Base ");
delay(10);
lcd.gotoPosition(43,8);
Serial.print(nodetemp4);
Serial.print("F ");
delay(10);
lcd.gotoPosition(79,8);
Serial.print(humid4);
Serial.print("%");
delay(10);
lcd.gotoPosition(109,8);
Serial.print("A/C");
delay(10);
lcd.gotoLine(3);
Serial.print(" ");
delay(10);
lcd.gotoLine(3);
Serial.print("Indr ");
delay(10);
lcd.gotoPosition(43,16);
Serial.print(nodetemp2 );
Serial.print("F ");
delay(10);
lcd.gotoPosition(79,16);
Serial.print(humid2);
Serial.print("%");
delay(10);
lcd.gotoPosition(109,16);
Serial.print(voltage2);
delay(10);
lcd.gotoLine(4);
Serial.print(" ");
delay(10);
lcd.gotoLine(4);
Serial.print("Attc ");
delay(10);
lcd.gotoPosition(43,24);
Serial.print(nodetemp3);
Serial.print("F ");
delay(10);
lcd.gotoPosition(79,24);
Serial.print(humid3);
Serial.print("%");
delay(10);
lcd.gotoPosition(109,24);
Serial.print(voltage3);
delay(10);
lcd.gotoLine(5);
Serial.print(" ");
delay(10);
lcd.gotoLine(5);
Serial.print("Otdr ");
delay(10);
lcd.gotoPosition(43,32);
Serial.print(nodetemp1);
Serial.print("F ");
delay(10);
lcd.gotoPosition(79,32);
Serial.print(humid1);
Serial.print("%");
delay(10);
lcd.gotoPosition(109,32);
Serial.print(voltage1);
delay(10);
What's that, like 4 times over almost the same thing? What is different that the difference can't be held in data? Lcd positions? Are data. What variable name? With arrays, the name is the same and the index is... data.
As I wrote above:
I can put them all in an array and loop the bunch through one block of code that takes care of them all as a matter of rule. I can have exceptions even, that's what if() statements are for. But the better my solution, the fewer of that kind of thing it will need.
That whole mess above can be reduced to less than 20 lines just by organizing the data and coding for it.
There is further reduction aimed at reducing ram use possible and so many ways to approach I won't even start. Just look at where you store things and ask if you have to then find ways to not have to. At some point the task will be reduced to what it has to do but until then it's fat.
Am I going to do it for you? I'd rather you did the thinking for yourself, it's the best way to learn. It will give you conceptual tools you won't get if someone does it for you and you can pick up a few tricks you wouldn't have otherwise and actually understand them having made them yourself.
I see things like this:
char nodereset[10] = "RS";
char nodetemp1[10] = "ND";
char humid1[10] = "ND";
char voltage1[10] = "ND";
char nodetemp2[10] = "ND";
char humid2[10] = "ND";
char voltage2[10] = "ND";
char nodetemp3[10] = "ND";
char humid3[10] = "ND";
char voltage3[10] = "ND";
I take it that from nodereset[] to voltage[] are where you prepare strings for printing out?
There's 9 different 10 character buffers right there alone. One for each variable. How PC!
It would be better by far to use as few buffers as you can get away with. The same -one- buffer for each in turn, that you can copy PROGMEM constant strings into or use itoa() or sprintf() to fill. You really only need ONE since you only print ONE out at a time. It should be long enough to handle anything you print within reason (maybe 20 or 32 to 40 chars?) but unless you have to have two for some odd reason then ONE is enough.
======================================================================================
Think about it this way. You need to set a table for 12 guests. Do you go and get all the plates, bowls, silverware and drinking glasses at once and then set them on the table? You might, if you had a big enough dish cart. But if you've only got your two hands then you get some of the things, set them in place and then more, until you're done.
Now suppose the real task is to feed 12 people but you're so used to everyone at the table at once you don't think hey, wait, I don't even need the big table. Instead, you're out looking for a big dish cart.