Yep, the issue you’re now faced with is the fact that the Arduino MEGA and the ThingShield are not communicating to each other correctly. The sketch is running, as is evident from the Serial Monitor, however it waits until it can communicate with the ThingShield before proceeding.
In the picture you showed above, it almost looks like one of the jumpers is plugged into the empty space next to pin 14, and the jumper that should be in pin 15 is actually in pin 14. It is probably just the way the picture was taken however.
I believe you stated that you’ve tried using my sketches as-is, direct from my Github repository, correct? I just want to make sure that you didn’t change any pin assignments, possibly causing a conflict with pins 2/3 and pins 14/15.
If desired, you can also try using a different Hardware UART on the Arduino MEGA, to make sure pins 14/15 aren’t the problem. To do so, you’ll need to edit a file in the ST_Anything library called constants.h. Near the very bottom of the file, you’ll want to adjust the code to comment out the last line, and uncomment the second to last line.
Before
//static const SmartThingsSerialType_t SERIAL_TYPE = HW_SERIAL2; //MEGA - You MUST jumper Pin16 to Pin2 AND Pin17 to Pin3 - do not use Pin2 or Pin3 in your sketch!
static const SmartThingsSerialType_t SERIAL_TYPE = HW_SERIAL3; //MEGA - You MUST jumper Pin14 to Pin2 AND Pin15 to Pin3 - do not use Pin2 or Pin3 in your sketch!
After
static const SmartThingsSerialType_t SERIAL_TYPE = HW_SERIAL2; //MEGA - You MUST jumper Pin16 to Pin2 AND Pin17 to Pin3 - do not use Pin2 or Pin3 in your sketch!
//static const SmartThingsSerialType_t SERIAL_TYPE = HW_SERIAL3; //MEGA - You MUST jumper Pin14 to Pin2 AND Pin15 to Pin3 - do not use Pin2 or Pin3 in your sketch!
You’ll then need to change your jumper wires accordingly - You must jumper Pin16 to Pin2 AND Pin17 to Pin3.
If this doesn’t work, we’ll need to look elsewhere. By the way, what version of the Arduino IDE are you running? I have seen issues caused by IDE releases which required code changes to address. I am running version 1.6.5 and have not updated it in a long time. I may try the latest version to see if it works, or causes any issues.
BTW - Here is what the Serial Monitor display should look like when everything is working. Example from the ST_Anything.ino sketch:
Everything: init started
Everything: Free RAM = 6180
Everything: UNKNOWN
Everything: JOINED
Everything: init ended
Everything: Free RAM = 6180
Everything: adding sensor named illuminance
Everything: Free RAM = 6170
Everything: adding sensor named temphumid
Everything: Free RAM = 6170
Everything: adding sensor named water
Everything: Free RAM = 6170
Everything: adding sensor named motion
Everything: Free RAM = 6170
Everything: adding sensor named contact
Everything: Free RAM = 6170
Everything: adding executor named switch
Everything: Free RAM = 6170
Everything: adding executor named alarm
Everything: Free RAM = 6170
Everything: initDevices started
Everything: Free RAM = 6176
Everything: Sending: illuminance 391
Everything: Sending: temperature 78
Everything: Sending: humidity 50
PS_Water::Analog Pin value is 207 vs limit of 200
Everything: Sending: water wet
IS_Motion: 30 second Motion Sensor Calibration Started...
Everything: Sending: contact closed
Everything: Sending: switch off
Everything: Sending: alarm off
Everything: initDevices ended
Everything: Free RAM = 6176
IS_Motion: Motion Sensor Calibration Finished
Everything: Sending: motion active