PROGMEM and string retrieval

tsarath:
Thanks much for the advice, I'll update, will look into reducing the String print lines or using similar messages as you suggest.

Unfortunately, there seems to be an unintended consequence of the additional postStrLen() and postStrPrint() functions. From what I can tell, the Nano spends more time executing updateThingSpeak() function than before and as a result rf_Receive() no longer works. I have verified if I comment out updateThingSpeak() things work as before.

rf_Receive() is asynchronous and I think is not getting executed correctly as a result even-though there has been no change in the code to that function, and hence does not receive the remote data over the RF link. :o

I've used delay commands as you can see in the main loop to step through each sequence. I tried increasing the updateThingSpeak() period to every 45s or 60s, but this didn't seem to help for some reason.

Not sure if you have any suggestions here, I'll try to debug this later today. I've tried some scheduler code before, but couldn't get it to work reliably in place of the delay functions in the loop whereto Nano is essentially doing nothing. I know some other Weather station code examples I have uses ISRs etc, but hopefully it will be a simpler fix.

Nevermind, please ignore my earlier comments.

After updating to the latest that you provided, moving the character buffer definition out of the postStrLen() and postStrPrint() functions seems to have fixed the rf_Receive() problem. I wonder what was going on prior.... :o

Probably still a problem with low memory, it appears the compiler is taking the code in the rf_Receive() and updateThinkSpeak() functions and placing them both into loop() . Not unusual for a function that only gets called once, but might lead to more memory being needed at the same time.

Try placing the following at the very top of the sketch, makes the program code a bit longer, and will take a tiny bit longer to execute, but makes sure the functions stay as functions.

void __attribute__ ((noinline)) rf_Receive();
void  __attribute__ ((noinline)) updateThingSpeak();