Weird things happening when code gets long

I have been writing a sketch that checks temperature and sends emails when different if loops are entered into.

Basically:

Check Temp
If a, send this email
if b, send this email
if c, send this email

If I only ask it to do three, it works fine. when I ask it to do a 4th, things start going weird: The serial monitor does not display all the Serial.prints, the emails don’t get sent…

I do not think it is a problem with the 4th if statement because this would also work as well as any combination of the three.

Check Temp
If d, send this email
if b, send this email
if c, send this email

Does the bridge gets messed up when the code gets too long? Same thing happens when I try to add web server stuff. When the code gets too long, it craps out

The compiler says i am using 70% of program storage space and 69% of Global variables. Could I be using too much memory on the linux side?

notifier.txt (14.5 KB)

The Arduino Yún is a microcontroller board based on the ATmega32u4 and the Atheros AR9331.
and Yún is Chinese word “cloud”.

Check Temp ATmega32u4.
Send Temp via Bridge to AR9331.
At AR9331 use python/php/lua

If a, send this email
if b, send this email
if c, send this email

if Z, send this email

sample code:

http://forum.arduino.cc/index.php?topic=268867.0

Thank you very much, i will try this. Do you have any idea what could be wrong with my code?

Yún is Chinese word "cloud".

run out resource should scale up. ATmega32u4 runs out, scale up to AR9331. AR9331 runs out, scale up to multiple core Intel. multiple core Intel runs out , scale out to a group of multiple core Intel.

Basic first vertical scale up until horizontal scale out make more sense.

It is cloud computing!

sonnyyu, Thank you very much. You pointed me in the correct direction. I re-wrote the code in the design of the example and it works great.

I think my problem was that I was putting too many keys/data in the datastore and it was messing everything up

Sample of horizontal scale out:

The fastest computer under sun is Tianhe-2 (MilkyWay-2)

http://www.top500.org/lists/2014/11/

Which has 3,120,000 Intel Xeon cores. beat ATmega32u4's speed by billion times, beat AR9331's speed by hundred million times

"Running out resource" should be kicked out from dictionary.