Pages: 1 [2]   Go Down
Author Topic: Serial print freezing  (Read 594 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the code all in one, including the new F() macros.

* main3.txt (16.84 KB - downloaded 7 times.)
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
  //Get oneWire Device Addresses
  if (!sensors.getAddress(HotHideTemp, 0)) Serial.println("Unable to find address for Device 0");
  if (!sensors.getAddress(ColdSideTemp, 1)) Serial.println("Unable to find address for Device 1");
  if (!sensors.getAddress(HotSideTemp, 2)) Serial.println("Unable to find address for Device 2");
Why don't these have F()?

Code:
  switch (chk)
  {
    case DHTLIB_OK: 
Serial.print("OK,\t");
break;
    case DHTLIB_ERROR_CHECKSUM:
Serial.print("Checksum error,\t");
break;
    case DHTLIB_ERROR_TIMEOUT:
Serial.print("Time out error,\t");
break;
    default:
Serial.print("Unknown error,\t");
break;
  }
Or these?

Code:
    daytime = 1;
    nighttime = 0;
It's either night or day, isn't it? Why do you need 2 ints to store one byte of data?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I missed those when adding the F()s.

As for the night/day, a previous incarnation of this had the day temperature profiles starting a few hours before the day light gets turned on. I plan on reincorporating that later, since my snake goes to sleep early.
Logged

East Anglia (UK)
Online Online
Faraday Member
**
Karma: 109
Posts: 4057
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I plan on reincorporating that later, since my snake goes to sleep early.
We really ought to have a "quote of the day" topic
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So after adding F() macros to every constant string, it still freezes on me. I have also updated my drivers and no change. Any more ideas?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25763
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Any more ideas?
I'm getting bored typing this, but I'm going to do it:  Code?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code Attatched

* main3.5.txt (21.09 KB - downloaded 8 times.)
Logged

Pages: 1 [2]   Go Up
Jump to: