my last comment sounded rude - i did not mean for it to sound rude. What I mean is, for a while statement dont you need to have check for the condition that you want first then execute an action if that condition is true? Thats why I wrote in the readgrainTemp (still not the actual code I am using. Thats why I posted on here. Assuming the condition has to be checked I dont know how to tell the arduino to check for that condition for the while statement).