Hey guys, how's it going? Can a moderator maybe move this to the Displays section, as it seems more fitting?!
I've been playing with this thing for the past few days, and at first just interfaced the DS18B20 temp sensor, and then added the SHT15 humidity sensor to the mix as well. What was odd is that it worked the first time I uploaded the code and ran it. The LCD sprang to life, and I was rather amazed with myself.
However, a snag has come about. I decided to leave it running overnight, only to get up a few hours later and see the text garbled. I simply reset the Mega, and all was well. This may be being nit picky, but it doesn't hurt to learn why it's doing this.
(random fact: the thermostat at school has a code on it, so I thought I could just pop off the cover, removing power, and thus resetting it. I ended up finding an Atmel MCU on the PCB, but no sign of an ICSP or any kind of "reset" button)
Here's two images, the first showing normal operation (and surprisingly close readings from both sensors) and the second showing what seems to be the beginning of the corruption of text.
Also, How would I be able to use one lcd.print command to display both the variable, and the text in the quotes?!
Thanks in advance... I'll post another picture of more garbled text as soon as I see it.
--I think I should say that I'm powering it with the recommended 3.3v, however, the data/logic is still 5v... but I have all 5 pins wired through 100k ohm resistors.. I'm halfway believing this is safe, and halfway thinking it could be the culprit of the problems. I do not have a level shifter, however.
EDIT: I'd also like to add that it seems like the whole display stops working after about 4 hours... but springs back to life when I reset it. Still confused as to why this happens
would I be able to use one lcd.print command to display both the variable, and the text in the quotes?
No.
Applies to all .print(x) methods:
Depending on the data tpye of x there are different methods called, doing different stuff until they all end up in write(chararray, len)
You might first collect all output into a char array, using sprintf(), but why ?
would I be able to use one lcd.print command to display both the variable, and the text in the quotes?
No.
Applies to all .print(x) methods:
Depending on the data tpye of x there are different methods called, doing different stuff until they all end up in write(chararray, len)
You might first collect all output into a char array, using sprintf(), but why ?
Ah, okay. I totally see no reason in doing it either... besides making the code look good, heh.
Update: I've been having it run for the past 24 hours, and so far, no glitches. However, sometimes the temperatures seem to be as far as 5 degrees apart... but when I leave the room for a couple hours, they can be as close as 0.4 degrees within range of each other. I'll end up just using 1 sensor, but it's nice to see this working and compare it to the thermostat that's not more than 8 feet away.