I was tweaking the program last night, basically shortening my strings going to twitter, shortening my Serial.print() strings and putting them in flash using Serial.print(F("put me in FLASH")). So now it works on the Mega, which seem weird because I had lots of extra memory (over 6K RAM), so I'm surprised that these changes made a difference. I'm using this code to display free RAM:
int freeRam(bool PrintRam)
extern int __heap_start, *__brkval;
freeSRAM = (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
Now on the UNO, if I use static IP I have 359 bytes of ram at the end of setup(). Then it drops to to 292 right before I send a message to twitter, then it drops again to 192 bytes when I send to COSM and it stays at 192 bytes and everything works okay.
If I use DHCP, I have 259 at the end of setup, then it drops to 184 bytes right before I send a tweet, then it's 201 bytes right before I try to upload to COSM. Then the UNO reboots right after this code:
Serial.println((F("\n\nSend 2 COSM"));
Also in setup() function, I use Serial.println("Setup") but the first two letters are garbled when they print out.