PaulS:
Create the functions in the ONE ino file.After loop(), put
/* Code to be sorted out *
/* */Move ALL the code in loop() to between those two lines.
Put ONLY the function calls I suggested in loop().
Add a new global variable to hold whatToDisplay.
Move the code that should set that variable into the determineWhatToDisplay() function, and set that variable.
Get that to compile, and print the variable whatToDisplay any time it changes. Even though the code won't actually accomplish anything, post that code, so that we can see that you recognized all the code that belongs in that function.
thank you for the explanation, but since I have 3 sensors, do I put them all together or do I separate them?
Ill try now only using one sensor.