Need Help Combining Programs

I am a teacher and I am trying to help my students. They have two programs that work well. One is a thermometer and the other is a flow meter. They want them both to run at the same time and on the same LCD. Flow meter on first two lines and Temp on the bottom two lines. I am having trouble merging the two sketches. Please Help.

Thermometer5.4.ino (1.65 KB)

Flow_daily.ino (3.2 KB)

What is the trouble you are having?

It's typical. The thermometer sketch doesn't follow the many things at once design, it uses the delay() function inside loop() for timing. Luckily the other one does, it uses millis() for timing. So the correct approach is to try to move the thermometer code into the other. Get rid of all delay() function usages. Call printTemp() inside millis() test block inside the loop() function of Flow_Daily. That should get both measurements at the same time.

Of course, you have to adjust all the LCD screen addresses. There may be other problems, but probably fixable.

aarg: It's typical. The thermometer sketch doesn't follow the many things at once design, it uses the delay() function inside loop() for timing. Luckily the other one does, it uses millis() for timing. So the correct approach is to try to move the thermometer code into the other. Get rid of all delay() function usages. Call printTemp() inside millis() test block inside the loop() function of Flow_Daily. That should get both measurements at the same time.

Of course, you have to adjust all the LCD screen addresses. There may be other problems, but probably fixable.

I am very new to this and the only thing I was able to do correctly is move the LCD screen addresses. I tried moving the printtemp() inside the millis() but I got a lot of error codes. Im not sure what you mean by test block().