Hi, I'm using max31855 with k type tc to display temp on lcd. My original code uses delay(1000); after showing the value from the tc to slow it down a bit.
My problem is now that I have other things going on and that extra 1 second delay is messing it up. Is there any better way to do this without delaying the whole void loop()? I wouldn't even know what to search for.
Depend on where you put that code, loopcounter could increment from 0 to 10 in nothing flat. On the other hand, loopcounter may never increment past 1.
I'd suggest that you need to try again. The millis() function could prove useful.
I should have waited until I got home to PC. Typing code with phone sucks... Glad you kinda got where I was going with it.
My idea above is to basically have a counter that increments by 1 every time the loop runs then when the counter reaches whatever number it will update the lcd with what I want and clear the counter. I'm going to test after a few beers but I'm sure it'll work.
Its actually working just fine now but the sketch updates the info on the lcd too fast. Slowing it down like this should be cake. I will update this thread and thanks for your reply.
I get good ideas in the shower lol. Isn't that weird?
Well, its working just like I thought but there's another problem. When input temp reaches over 100 it works fine. When it goes back down the extra character after the two spaces stays there. I tried to fix it... Looks like maybe I'll be going another route. It looked perfect though with counter only at 5. Temp was updated around every second or so. Maybe a little faster but it looked perfect.
I'll update even if no one reads. Maybe someone down the road will?
Well, same problem with millis() function as blink without delay sketch.... Updates LCD just fine every second but clears the characters....
EDIT:I'm a noob that's what happening hahahaha! I had an lcd.clear() in the void loop. The same thing is happening with every different way of doing it. Ends up being extra characters on the display after output to lcd is < 100. Say old temp was 118 and next temp was 88. Display shows 888. Its hard being a noob lolol.
I used my original code and got rid of the lcd.clear() in the void loops and it acts exactly like it did with all the other tries after removing it(lcd.clear).