Serial Monitor from Sketch Not Working Properly

I am currently working on a project for my university involving an Arduino Uno and Adafruit WiFi-Shield CC300. My group and I found a set of sketches that we have used thus far (source: Overview | Cloud Thermometer | Adafruit Learning System). Essentially, we are using a thermistor to contact a server (DynamoDB). The sketch, however, is not working properly. Once we enter the necessary information into the sketch (such as WiFi name and password), we compile/verify then upload to the Arduino. Everything works properly until we check the serial monitor. The sketch is supposed to print whether or not it is able to contact the server (DynamoDB). No text comes on screen. We then utilized a Serial.print to ensure that the serial monitor was working properly: the message appeared on the monitor. Does anyone have an idea as to how we should get the sketch to operate properly? I’d really appreciate any help, thanks!

CloudThermometer.ino (15.8 KB)

What are you trying to do with constructs such as this? :

if (!cc3000.begin()) {
    Serial.println(F("Unable to initialise the CC3000!"));
    while(1);
  }

6v6gt: What are you trying to do with constructs such as this? :

if (!cc3000.begin()) {
    Serial.println(F("Unable to initialise the CC3000!"));
    while(1);
  }

If the CC3000 library fails to initialise, notify the user then halt execution?

@ekrentz, exactly which serial print is failing? A line number would help.

Essentially, we are using a thermistor to contact a server

And the CC3000 to measure the temperature?

Seems ass-backwards to me.

OldSteve: If the CC3000 library fails to initialise, notify the user then halt execution?

@ekrentz, exactly which serial print is failing? A line number would help.

The Serial.print created at the beginning of the code (not present in the code above) temporalily was the only one that worked, all others fail.

@6v6gt that section of the sketch notifies the user if initialization fails, however, no text appears in the monitor where I should be told if initialization does work (and does not).

PaulS: And the CC3000 to measure the temperature?

Seems ass-backwards to me.

Sorry, we are using the thermistor to read temperature and the CC3000 to contact the server

ekrentz: The Serial.print created at the beginning of the code (not present in the code above) temporalily was the only one that worked, all others fail.

Then you know for sure that the failure is in 'setup()', at least. Otherwise this would print:-Serial.println(F("Running...")); Try adding a serial print after each operation in 'setup()', to isolate the point where everything stops. Obviously execution gets hung up in one of those 'while()' loops, but which one?

I’d not seen a blocking while() in setup() but I’ve convinced myself by a test that it works and is compatible with the arduino main() function, not blocking serial activity etc. Anyway, that is clearly not your problem.
If you do something like this where the program is waiting for 60 seconds, it is nice to put a message in it, so the user knows what is happening:

// Get an initial time value by querying an NTP server.
  unsigned long t = getTime();
  while (t == 0) {
    // Failed to get time, try again in a minute.
    Serial.print(F("Failed to get time, try again in a minute."));   // <<<<<<<<<<<<<<<<<<<<<
    delay(60*1000);
    t = getTime();
  }

If you have followed OldSteve’s advice, you’ll have done something similar already.